SQL Server Management Studio always inserts a GO command when I create a query using the right click "Script As" menu. Why? What does GO actually do?
相关问题
- sql execution latency when assign to a variable
- What is the best way to cache a table from a (SQL)
- php PDO::FETCH_ASSOC doesnt detect select after ba
- Bulk update SQL Server C#
- SQL to Parse a Key-Value String
相关文章
- Entity Framework 4.3.1 failing to create (/open) a
- How to truncate seconds in TSQL?
- Code for inserting data into SQL Server database u
- Delete Every Alternate Row in SQL
- Linux based PHP install connecting to MsSQL Server
- SQL Azure Reset autoincrement
- How do we alias a Sql Server instance name used in
- Is recursion good in SQL Server?
Since Management Studio 2005 it seems that you can use
GO
with anint
parameter, like:The above will insert 10 rows into
mytable
. Generally speaking,GO
will execute the related sql commandsn
times.Here is the magic of GO.
SYNTAX : Go INT
(BatchNumber)
BatchNumber: No of times occurred
Looks simple,It might lead you to Spaghetti if you code deeper.