Use a signal to notify Microsoft SQL server of the completion of a batch of transact-SQL statements.
Go is not a Transact-SQL statement, but a command recognized by osql and iSQL utilities and SQL Server Query analyzer.
If your SQL statement is too long, you need to write go or some statements. It can only be the first operation. You have to write go before, go indicates that when the batch processing statement is added with this go, The go line is executed.Code, And then execute the following code ......
In such cases, go is required to process data in batches ......
Use master
Go
If exists (select * From sysdatabases where name = 'kejiandb ')
Drop database kejiandb
Go
Create Database kejiandb
Go
Use kejiandb
Go
-- (Industry table)
Create Table trade
(
Tra_id int Primary Key Identity (1, 1) not null, -- industry ID (primary key, auto-increment)
Tra_name varchar (50) not null -- industry name
)
Go