我想在SQL Server上的一個行中執行多個語句2005年我如何做一個行:在SQL Server一行中的多個命令2005
use master
go
sp_spaceused mytable
當我嘗試use master; go; sp_spaceused mytable
我得到Incorrect syntax near 'go'
。
當我嘗試use master go sp_spaceused mytable
我得到Incorrect syntax near 'go'
。
我發現,除了使用分號,而不是使用'GO',我也只好用關鍵字'EXEC'在存儲過程的前面。 – 2010-02-15 10:18:04