declare auth_cur cursor scroll for

select au_id, au_lname, au_fname, state

from authors for update of au_lname

open auth_cur

declare @rowcount int

set @rowcount = 6

fetch absolute @rowcount from auth_cur  --将变量@rowcount标识的行设置为当前行

--下面1行是利用游标进行修改操作

update authors set au_lname='' where current of auth_cur --修改游标中的当前行

--下面1行是利用游标进行删除操作

delete from authors where current of auth_cur

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-06-18
  • 2021-12-30
  • 2021-11-11
  • 2022-02-18
  • 2022-02-09
  • 2021-04-01
  • 2021-12-29
相关资源
相似解决方案