Answer Posted / sanjeev kumar
CREATE VIEW Authorsview
AS
SELECT au_id, au_fname, au_lname, phone, state, contract
FROM authors
WHERE state = 'ca'
This is an updatable view and a user can change any column value
like:
UPDATE Authorsview SET state='NY'
Example: but when we create With Check Option then Same as
above but the state column cannot be changed.
CREATE VIEW Authorsview
AS
SELECT au_id, au_fname, au_lname, phone, state, contract
FROM authors
WHERE state = 'ca'
With Check Option
The view is still updatable, except for the state column:
UPDATE Authorsview SET state='NY'
This will cause an error and the state will not be changed
because we have use check option with state.
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is log shipping?
What is the difference between clustered index and primary key?
How to create a new schema in a database?
What is a subquery in a select query statement in ms sql server?
What is a database in ms sql server?
Explain about Joins?
What are the different types of normalization?
What are audit control procedures?
What is the default fill factor value?
What is the purpose of sql profiler in sql server? : sql server database administration
What are system databases in ms sql server?
How many types of objects are there?
What is a database table?
What is co-related sub query?
After removing a table from database, what other related objects have to be dropped explicitly?