【2019 2020春学期】数据库作业17:SQL练习9 – CURSOR
程序运行: IF(exists(select * from sys.objects where name='pro_cursor')) DROP PROCEDURE pro_cursor GO CREATE PROCEDURE pro_cursor --存储过程 AS DECLARE @Sno char(9) --定义变量 DECLARE @Sname char(20) --定义变量 DECLARE mycursor CURSOR FOR select Sno,Sname from Student --声明游标 OPEN mycursor --打开游标 FETCH NEXT FROM myc
下载地址
用户评论