Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

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

user-image
Question ajoutée par Utilisateur supprimé
Date de publication: 2016/02/18
Syed Ali Abbas
par 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
par 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
par 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
par 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.

Utilisateur supprimé
par Utilisateur supprimé

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
par murat osmantevfik , Software Engineer , Independent Electoral Commission

yes we can update View .

UPDATE View Name SET Colum Name = 'Name'

Danish Arif
par 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
par 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. 

محمد الفيفي
par محمد الفيفي , 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
par 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
par 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

More Questions Like This