Updating views in sql

Rated 3.93/5 based on 704 customer reviews

The basic CREATE VIEW syntax is as follows − ---- ---------- ----- ----------- ---------- | ID | NAME | AGE | ADDRESS | SALARY | ---- ---------- ----- ----------- ---------- | 1 | Ramesh | 32 | Ahmedabad | 2000.00 | | 2 | Khilan | 25 | Delhi | 1500.00 | | 3 | kaushik | 23 | Kota | 2000.00 | | 4 | Chaitali | 25 | Mumbai | 6500.00 | | 5 | Hardik | 27 | Bhopal | 8500.00 | | 6 | Komal | 22 | MP | 4500.00 | | 7 | Muffy | 24 | Indore | 10000.00 | ---- ---------- ----- ----------- ---------- The WITH CHECK OPTION is a CREATE VIEW statement option.The purpose of the WITH CHECK OPTION is to ensure that all UPDATE and INSERTs satisfy the condition(s) in the view definition.

A view can contain all rows of a table or select rows from a table.

Yes, in Oracle, the SQL VIEW continues to exist even after one of the tables (that the SQL VIEW is based on) is dropped from the database.

However, if you try to query the SQL VIEW after the table has been dropped, you will receive a message indicating that the SQL VIEW has errors.

However, to create an updatable view, the SELECT statement that defines the view must not contain any of the following elements: If you create a view with the TEMPTABLE algorithm, you cannot update the view.

Note that it is sometimes possible to create updatable views based on multiple tables using an inner join.

Leave a Reply