0
DECLARE @sqlCommand nvarchar(1000)
DECLARE @countnumber int = 0
SET @sqlCommand = 'Set @countnumber = (SELECT count(*) from dsnv)'
EXEC (@sqlCommand)
print @countnumber ;
,但我得到的錯誤如何在動態SQL中返回一個值(通過設置一個變量)?