using GO keyword in SQL Server

2020-07-11 05:22发布

i know the use of GO keyword. it sends multiple statements to sql server as a whole group, instead of sending each statement one by one. i hope i am right!

but i want to know that do programmers use it in real applications. like if we create a stored procedure, then that also does the same thing,it also compiles the code and make an execution plan , and send the whole group to the server.

so do we need to specify the GO keyword in the coding of database objects such as triggers, views, stored procedures ?

7条回答
Ridiculous、
2楼-- · 2020-07-11 06:26

I suspect you're going to be better off using semicolon (;) to separate statements.

查看更多
登录 后发表回答