A view can be Updated, deleted and inserted only if it has only one base table.
For example consider there is a table called book and it has view called Book_View. So we can update, delete and insert in that view and this view will insert the data in actual table “Book”. So if we have a view which contains more than one table then we can't perform these operations on that view.
Consider the view that list the books on the basis of category. So there would be join on book table and category table on categoryID column in this view. So we can’t perform updating,inserting and deleting operations on this view because SQL server will get confuse and will give error.
No comments:
Post a Comment