ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

Is it possible to update Views? If yes, How, If Not, Why?

user-image
تم إضافة السؤال من قبل مستخدم محذوف‎
تاريخ النشر: 2016/02/18
Syed Ali Abbas
من قبل Syed Ali Abbas , Business Applications Specialist (SharePoint) , Muntajat

Yes, views can be updated if they are built on only one table and fulfill following conditions:

  • No GROUP BY clause
  • No HAVING clause
  • No aggregate functions
  • No calculated columns
  • No UNION, INTERSECT or EXCEPT
  • No SELECT DISTINCT clause

Bartholomew DSouza
من قبل Bartholomew DSouza , Software Development Manager , LIN SCAN ADVANCED PIPELINE & TANK SERVICES PRIVATE LIMITED

Possible based on this condition : A View can be updated/deleted/inserted if it has only one base table if the view is based on columns from one or more tables then insert, update and delete is not possible.

Khalid Alharbi
من قبل Khalid Alharbi , Project Site Engineer , Wipro Arabia Limited

We can update a view by using insert,update,delete statements.

A view from a single table can be updated where as a view from multiple tables can not be updated.

Mohd Shamshad Alam
من قبل Mohd Shamshad Alam , Software Development Manager , Rachna Sagar Pvt Ltd

If you update a view you will actually be updating the underlying table. A view is nothing physical, just a representation of the data underneath it.

مستخدم محذوف‎
من قبل مستخدم محذوف‎

The data "in" a view has no existence independent from the tables that make up the view. The view is actually a stored SELECT statement that is presented as a table. The data is stored in the original tables and only "assembled" into the view when you want to look at it. If the view is update-able (not all views are) the updates are applied to the table data.

murat osmantevfik
من قبل murat osmantevfik , Software Engineer , Independent Electoral Commission

yes we can update View .

UPDATE View Name SET Colum Name = 'Name'

Danish Arif
من قبل Danish Arif , Mobile Application Developer , Swenggco Software

possible to update a view if it was created from one base table. otherwis  not possible to update a view.

nabil el aichaoui
من قبل nabil el aichaoui , IT Project Manager / Consultant (Freelance) , Bruneau

When modifying data through a view, using INSERT or UPDATE statements, certain limitations exist depending upon the type of view. Views that access multiple tables can only modify one of the tables in the view. 

محمد الفيفي
من قبل محمد الفيفي , Software Testing (Ito Quality & System Service Testing ) , Atheeb Intergraph Saudi Company

yes , update (view name) set insert data or the condition where any field

Hafiz Abdur Rehman
من قبل Hafiz Abdur Rehman , Full Stack Developer , PwC - Australia

Yes,

View is dependant on the logic you have applied in respective model ,controller or action . You can update it there if it does not brake other things (i.e. data remains consistent).

Mirza Matlub Alli Baig
من قبل Mirza Matlub Alli Baig , Functional Consultant (Oracle HRMS) , Gemini Software Solutions - India

It is not possible to update view. Because the original data exists in table not in view DML operations like Insert, Update, Delete are not possible

المزيد من الأسئلة المماثلة

هل تحتاج لمساعدة في كتابة سيرة ذاتية تحتوي على الكلمات الدلالية التي يبحث عنها أصحاب العمل؟