ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 带CHECK选项的INSERT

带CHECK选项的INSERT

原创 Linux操作系统 作者:MarcoXi 时间:2010-07-01 00:43:35 0 删除 编辑

--带check option的insert
insert into(select order_id,order_date,customer_id, order_total
from  oe.orders
where order_total = 1000
with check option
)
values (14, sysdate, 105, 1000);

select * from oe.orders where order_id=13 and customer_id=101;
 ORDER_ID ORDER_DATE                                                                  ORDER_MO CUSTOMER_ID ORDER_STATUS ORDER_TOTAL SALES_REP_ID PROMOTION_ID
---------- --------------------------------------------------------------------------- -------- ----------- ------------ ----------- ------------ ------------
        13 01-JUL-10 01.07.59.000000 AM                                                                 101                     1000

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/21126685/viewspace-666773/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: 请教047中一题目
下一篇: 多表 INSERT
请登录后发表评论 登录
全部评论

注册时间:2010-04-04

  • 博文量
    28
  • 访问量
    20822