MSSQL output使用
程序员文章站
2023-11-20 19:58:34
return num --只能是整数 create procedure ch @ch varchar(55) output, @ping varchar(45) outpu...
return num --只能是整数
create procedure ch
@ch varchar(55) output,
@ping varchar(45) output
as
select @ch='ffgfgfg',@ping='chenssksksk'
--调用
declare @chs varchar(55),@pins varchar(45)
execute ch @chs output,@pins output
print @chs
print @pins
=============
create procedure pin
as
return 1
declare @num int
set execute @num=pin
print @num
==================
create function jian()
returns varchar(500)
as
begin
declare @ch varchar(50)
set @ch='dkdkkddk'
return @ch
end
select dbo.jian()