Sql语法-游标、触发器、存储过程
Sql语法-游标、触发器、存储过程模糊查询与通配符游标触发器存储过程
模糊查询与通配符
_ 一个字符
% 任意长度字符串
[] 括号中所指定范围内的一个字符
[^] 不在括号中所指定范围内的一个字符
游标
–定义一个游标
declare oper_cur cursor for select opid,opcd,opname from info_oper
–打开游标
open oper_cur
while @@fetch_status=0
begin
–读取游标
fetch next from us
原创
2020-12-18 22:04:32 ·
131 阅读 ·
1 评论