07/25: MS SQL: sp_executesql の結果を変数に取り出す
Category: Web dev
Posted by: hajime osako
sp_executesql の結果を変数に取り出す
EXEC sp_executesql N'SELECT @C = COUNT(qty), @S = SUM(qty) FROM sales', N'@C int OUTPUT, @S int OUTPUT', @C output, @S output