当前位置: 东星资源网 > 优质范文 > 廉政谈话 > 正文

SQL实验报告

时间:2020-11-21 11:39:49 来源:东星资源网

 实验四触发器实验

 (一)

 after

 触发器

 (1 1 )

 在l l i neitem 表上定义一个 after 触发器, , 当修改列项目e e x tendedprice d i scount

  x tax 时, , 要把 s orders 表得to o tal pri ce e 一起修改, , 以保证数据一致性

 C RE ATE T RIGGER

 trig _line ite m_ pr ice_ update on line it em fo r upda te

  a as

  begin i f (UPDATE(ex tend edprice)

 o r UPDATE(tax)

 or UPD AT E(di scou nt)) begin

 -— 声明游标变量指向 inserted 表

 d eclare

 cursor_inserted c urs or

 rea d_only

 o for select order key,linenu mber,exte nd edpr ice, dis coun t, tax

  from

 in ser ted

  —-息...

== 试读已结束,如需继续阅读敬请充值会员 ==
本站文章均为原创投稿,仅供下载参考,付费用户可查看完整且有格式内容!
(费用标准:38元/月,98元/年,微信支付秒开通!)
升级为会员即可查阅全文 。如需要查阅全文,请 免费注册登录会员
标签: 实验 报告 SQL
《SQL实验报告.doc》
将本文的Word文档下载到电脑,方便收藏和打印
推荐度:

文档为doc格式

关于我们 | 网站地图 | 版权声明 | 联系我们 |

Copyright @ 2006 - 2024 dxf5.com All Rights Reserved

东星资源网 版权所有 友链、商务、投稿、客服、撤稿、投诉:QQ:179266880 邮箱:cptoo@163.com
《中华人民共和国电信与信息服务业务》 工业和信息化部 湘ICP备14009742号-43