create view---check option

简介:

create view pb_quarters as
select * from piggy_bank 
where coin = 'Q'

select * from pb_quarters

create view pb_dimes as
select * from piggy_bank
where coin = 'D'

select * from pb_dimes

create view pb_neckel as
select * from piggy_bank
where coin = 'N' with check option

select * from pb_neckel

insert into pb_quarters values('Q', '1993')
select * from pb_quarters

insert into pb_quarters values('D', '1942')
select * from pb_quarters

1.当插入视图的值在视图中不存在,则插入无效,如果‘D’不存在,则插入无效,而Q存在,则insert 有效。












本文转自鹅倌51CTO博客,原文链接: http://blog.51cto.com/kaixinbuliao/881679,如需转载请自行联系原作者






相关文章
|
6月前
SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘thinkphp.test‘ don‘t exsit
SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘thinkphp.test‘ don‘t exsit
111 0
|
5月前
|
Oracle 关系型数据库 数据库
【已解决】ORA-00942: table or view does not exist
【已解决】ORA-00942: table or view does not exist
70 0
|
10月前
|
关系型数据库 MySQL 数据库
View ‘information_schema.SCHEMATA‘ references invalid table(s) or column(s) or function(s) or define
View ‘information_schema.SCHEMATA‘ references invalid table(s) or column(s) or function(s) or define
147 0
|
容器
Fragment的replace、add、hide、show的使用和详解
Fragment的replace、add、hide、show的使用和详解
custom field further usage - add into UI and report
custom field further usage - add into UI and report
115 0
custom field further usage - add into UI and report
transaction type popup window when create service order
Created by Wang, Jerry, last modified on Dec 13, 2014
transaction type popup window when create service order
How to create CDS view to return Service order item detail data
You are asked to create a CDS view which must return the following information of Service order line item.
119 0
How to create CDS view to return Service order item detail data
test of ui5 duplicate control id
Created by Jerry Wang, last modified on Aug 21, 2015
103 0
test of ui5 duplicate control id
OPA 13 - ok(oButton,find the Create button);
Created by Wang, Jerry, last modified on Nov 08, 2015
128 0
OPA 13 - ok(oButton,find the Create button);