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
How does index makes search faster?
What do I need to start working with sql studio? : sql server management studio
Find first and last day of current month in sql server
Define outer join in sql server joins?
What is the difference between indexing and hashing?
What to check if a User database is locked?
after migrating the dts packg to ssis by using migrtn wizrd in 2005. iam not able to open ssis pack and getting error. what r those errors? how to resolve?
Explain external key management in sql server 2008
What is scd (slowly changing dimension)? : sql server analysis services, ssas
How can we migrate from SQL server to SQL Azure?
Is oracle faster than sql server?
Do you think BCNF is better than 2NF & 3NF? Why?
Do you know what are the restrictions applicable while creating views? : SQL Server Architecture
What is db stored procedure?
Give me a SQL Query to find out the second largest company?