获取动态语句中的变量值

DECLARE @Counts INT
EXEC sp_executesql N'select @Counts=count(1) from tbName',N'@Counts int out',@Counts OUT
SELECT @Counts

 

posted @ 2012-05-25 09:54  xfyn  阅读(191)  评论(0编辑  收藏  举报