开发者

SQL Views "WITH CASCADE CHECK OPTION" Behaivor?

开发者 https://www.devze.com 2023-02-12 18:31 出处:网络
I can\'t find any reference, or do开发者_StackOverflow中文版cumentation on this. CREATE VIEW view1 AS SELECT * FROM tbl WHERE x = 1;

I can't find any reference, or do开发者_StackOverflow中文版cumentation on this.

CREATE VIEW view1 AS SELECT * FROM tbl WHERE x = 1;

CREATE VIEW view2 AS SELECT * FROM view1 WHERE y = 1 WITH CASCADE CHECK OPTION;

Does the condition clause read x = 1 AND y = 1 in case of UPDATE/INSERT on view2?


OK, so maybe have a look at

WITH CASCADED CHECK OPTION and it's example

and

Defining Views

It would seem that the WITH CASCADE option does enforce all view criteria.


The option "With Cascade Check Option" is normally used with "Updatable Views". The given clause is used to prevent inserts or updates to rows except those for which the WHERE clause in the select_statement is true.

0

精彩评论

暂无评论...
验证码 换一张
取 消