I would like to execute multiple statements on one line in SQL Server 2005. How do I do the following on a single line:
use master
go
sp_spaceused mytable
When I try use master; go; sp_spaceused mytable I get Incorrect syntax near 'go'.
When I try use master go sp_spaceused mytable I get Incorrect syntax near 'go'.
should suffice.
GOsimply signals the end of a batch of Transact-SQL statements to the SQL Server utilities.