1
爲什麼第一個語句是語法錯誤?T-SQL Exec語句語法錯誤
-- this does not work: "incorrect syntax near the keyword 'system_user'"
exec dbo.spEmployee_GetRecords @pLoginName = system_user
-- this works
declare @p nvarchar(30);
select @p=system_user
exec dbo.spEmployee_GetRecords @pLoginName = @p
(SQL Server 2005速成版)
你說得對。與$(insert-any-programming-language)中函數調用的相似性誤導了我。我想知道底層的設計決定...... –