34,590
社区成员
发帖
与我相关
我的任务
分享
declare @P1 int--定义变量,变量名P1,类型为int
set @P1=180150181--给变量赋值
declare @P2 int--定义变量,变量名P2,类型为int
set @P2=8--给变量赋值
declare @P3 int--定义变量,变量名P3,类型为int
set @P3=1--给变量赋值
declare @P4 int--定义变量,变量名P4,类型为int
set @P4=0--给变量赋值
exec sp_cursoropen @P1 output, N'select * from tb1'
, @P2 output, @P3 output, @P4 output
--调用存储过程,存储过程名为sp_cursoropen,后面是它的5个参数,output指定该参数为输出参数
select @P1, @P2, @P3, @P4--查询这4个变量的值