Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Problem with GO

Author  Topic 

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-05-19 : 02:44:41

sp_pkeys 'tt' Go sp_pkeys 'tt1' - This does not work giving error

Server: Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near 'Go'.

But this works

sp_pkeys 'tt'
Go
sp_pkeys 'tt1'

Is it necessary to have GO as seperate one?


Madhivanan

Failing to plan is Planning to fail

AndyB13
Aged Yak Warrior

583 Posts

Posted - 2005-05-19 : 02:57:12
Quotes from BOL

"GO is not a Transact-SQL statement; it is a command recognized by the osql and isql utilities and SQL Query Analyzer."

"A Transact-SQL statement cannot occupy the same line as a GO command. However, the line can contain comments"


Beauty is in the eyes of the beerholder
Go to Top of Page
   

- Advertisement -