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 dml command?
What is the report model project?
What is a benefit of using an after insert trigger over using a before insert trigger?
Can a database be shrunk with users active?
Suppose you want to implement the many-to-many relationships while designing tables. How would you do it?
How to define the name and server for a new dsn?
What is side by side migration in sql server?
What is the difference between the application object and session object?
What are the restrictions that views have to follow?
What is the difference between join and inner join?
What is a join in sql?
What is the default sql server instance name?
how many triggers you can have on a table? : Sql server database administration
How to override dml statements with triggers?
What is an sql server agent?