Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

what's the end of a proc

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I find some book write proc in QA:
...
create proc abc as
...
...
go

exec abc

dose the proc in sql server havn't it's end sentence?
such as END PROC?
 
No there is no end sentence. SQL Server will see the end of the procedure when there are no more tokens to parse (after the last sql statement of the procedure)
 
This is a SQL batch. A batch is executed in a tool like query analyzer. Statements are grouped together and acted upon in this group (batch). These groups, or batches, are separated from each other using the GO keyword. This keyword is only recognized by tools such as query analyzer, ISQL and OSQL.

In this case, the proc will be created using the statements up to the GO keyword (the first batch), then will be executed in the second batch. Tom Davis
tdavis@sark.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top