文件名称:sql server游标
文件大小:19KB
文件格式:WPS
更新时间:2015-06-24 19:16:44
游标
use 人事管理系统 go declare youbiao scroll cursor for select 员工编号,员工姓名from 员工信息 for read only open youbiao fetch next from youbiao fetch prior from youbiao fetch absolute 2 from youbiao //从游标头开始第N行 负数时为游标尾第N行 fetch relative -2 from youbiao //从当前行开始的第N行,负数为当前行之前的第N行 close youbiao deallocate youbiao go