Updating relational databases through views

Additionally, inserting data is prohibited for the following types of views: It is also possible to insert or update data through a view such that the data is no longer accessible via that view, unless the WITH CHECK OPTION has been specified.

Almost any SQL that can be issued natively can be coded into a view; there are exceptions, however.

In fact, the evidence supports not using views in this manner.

Therefore, a view can be considered a logical table. The SQL comprising the view is executed only when the view is accessed and views can be accessed by SQL in the same way that tables are — by SQL.

No physical structure is required of a view; it is a representation of data that is stored in other tables. When modifying data through a view (that is, using INSERT or UPDATE statements) certain limitations exist depending upon the type of view.

For example, the UNION operator can not be used in a view and you cannot create a trigger on a view.

All of the basic DDL statements can be used to create and manage views including CREATE, DROP, and ALTER.

Leave a Reply

  1. dating in high school vs college 16-Nov-2018 16:58

    I've been on Reddit for a few months while now reading everyone's posts and comments, even commenting a little myself.