GO is a batch terminator, you can
however change it to whatever you want.
Also read
previous articles on GO
Go to
Tool-> Option -> Query Execution
And then
change the Batch Separator to word of your choice, here in this example, I
changed it to BATCH.
Now if I try
to write code with batch separators GO, SSMS will not recognize.
alter table tab2
add d_manager varchar(10)
GO
select d_id,d_name,d_manager from tab2
Msg 102, Level 15,
State 1, Line 4
Incorrect syntax near 'GO'.
Now if we
replace GO with BATCH, it should work properly. Lets see
alter table tab2
add d_manager varchar(10)
BATCH
select d_id,d_name,d_manager from tab2
So this is
how you can specify your own word as a batch terminator
Your code, sound the horn
Post Reference: Vikram Aristocratic Elfin Share
No comments:
Post a Comment