哪种是正确的语法?
DECLARE @TotalRows INT
SET @TotalRows = (SELECT COUNT(*) FROM MyTable WHERE MyID = Value)
或者
DECLARE @TotalRows INT
SELECT @TotalRows = COUNT(*) FROM MyTable WHERE MyID = Value
这真的很重要吗?