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 difference between global temporary tables and local temporary tables?
What are the benefits of normalization?
What is the index requirement in SQL Azure?
Does a server store data?
Explain system views?
Can foreign key be duplicate?
Explain important index characteristics?
What are cursors and when they are useful?
Do you know what are the differences between lost updates and uncommitted dependencies?
What is Fragmentation and Defragmentation? For 32GB Table,How can we do the fragmentation?
How is foreign key related to primary key?
Is INSTEAD OF trigger directly applicable to Table ?
What are rest-style architecture's?
What are the types of subscriptions in SQL Server replication?
but what if you have to create a database with two filegroups, one on drive c and the other on drive d with log on drive e with an initial size of 600 mb and with a growth factor of 15%? : Sql server database administration