Updating table from a view in sql

The purpose of the WITH CHECK OPTION is to ensure that all UPDATE and INSERTs satisfy the condition(s) in the view definition.If they do not satisfy the condition(s), the UPDATE or INSERT returns an error.A view can be updated under certain conditions which are given below − ---- ---------- ----- ----------- ---------- | ID | NAME | AGE | ADDRESS | SALARY | ---- ---------- ----- ----------- ---------- | 1 | Ramesh | 35 | 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 | ---- ---------- ----- ----------- ---------- Rows of data can be inserted into a view.The same rules that apply to the UPDATE command also apply to the INSERT command.

A view is actually a composition of a table in the form of a predefined SQL query.

The triggers in views are covered later in this chapter.

Another limitation of views that you may be familiar with is that a view cannot be indexed. In SQL Server 2000, you can indeed create indexed views, as shown later in this chapter.

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

A view can be created from one or many tables which depends on the written SQL query to create a view.

Search for updating table from a view in sql:

updating table from a view in sql-52updating table from a view in sql-45

Views are saved SELECT statements that allow you to operate on the results that are returned from them.

Leave a Reply

Your email address will not be published. Required fields are marked *

One thought on “updating table from a view in sql”

  1. If you do not wish to receive an appointment reminder it is possible to opt of the service by contacting the dedicated appointment numbers or talking to a member of staff when you next visit our hospital.