时间:2021-07-01 10:21:17 帮助过:2人阅读
use pubs go declare @count int declare @sql nvarchar(4000) set @sql=‘select @count=count(*) from titles‘ exec sp_executesql @sql,N‘@count int output‘,@count output --请注意字符串前一定要加N select @count as [行数] go
sql 动态语句 输出变量
标签:out exe sele -- count char exec 字符 输出