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 ms sql server triggers?
Explain the difference between function and stored procedure?
what are the Prerequisites for Replication?
What is the purpose of self join?
What is xdr?
How is foreign key related to primary key?
How extra digits are handled with numeric data type literals?
Where do we use trace frag?
What is difference between index and primary key?
Explain forward - only cursors?
What is tablix?
What are cursors? Explain different types of cursors. What are the disadvantages of cursors? How can you avoid cursors?
Explain the concept of recursive stored procedure.
You want your report to display a hyperlink that will take users to your intranet. How do you configure such a hyperlink?
What is the native system stored procedure to execute a command against all databases?