14db.txt

来自「the original code of the book the princi」· 文本 代码 · 共 48 行

TXT
48
字号
use 企业销售管理系统
declare hycursorzf6 cursor scroll for
select * from 职工
open hycursorzf6 
fetch absolute 4 from hycursorzf6
update 职工 set 仓库号='modifybycursor' where current of hycursorzf6
close hycursorzf6
deallocate hycursorzf6
--select *
--from 职工


--declare hycursorzf7 cursor scroll for
--select * from 职工
--open hycursorzf7
--fetch absolute 3 from hycursorzf7
--delete from 职工 where current of hycursorzf7
--close hycursorzf7
--deallocate hycursorzf7
select *
from 职工


declare hycursorzf8 cursor scroll for
select * from 职工 where 职工号='zg2'
open hycursorzf8
if @@fetch_status=0
 print '存在该记录!'
else
 print '不存在该记录!'
close hycursorzf8
deallocate hycursorzf8


declare hycursorzf9 cursor scroll for
select * from 职工 where 工资>1900
open hycursorzf9
fetch first from hycursorzf9
while @@fetch_status=0
 begin
  fetch next from hycursorzf9

 end
close hycursorzf9
deallocate hycursorzf9


一个逻辑单元必有具有以下4个属性:原子性(Atomic),一致性(consistent),隔离性(isolated),持久性(Durable),才能成为一个事务,这就是事务的ACID属性。

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?