执行带返回值的存储过程

记录下执行带返回值的存储过程

1.定义变量接收返回值@out

2.@tb_product_catalogID = @out 定义返回值用@out接受,标记output

GO
--带返回值的存储过程执行
DECLARE @out INT
EXECUTE dbo.tb_product_catalog_INSERT @name = N'测试', -- nvarchar(100)
@brand_id = 0, -- int
@parent_id = 0, -- int
@custid = 0, -- int
@sort = 0, -- int
@manufacturer_id = 0, -- int
@tb_product_catalogID = @out OUTPUT-- int
PRINT @out
GO


--查看存储过程
sp_helptext tb_product_catalog_INSERT
GO

posted @ 2016-07-04 14:47  zhuyapeng  阅读(3502)  评论(0编辑  收藏  举报