Combining Multiple Statements

Interactive SQL allows you to enter multiple statements at the same time. End each statement with the Transact-SQL command, go.

Enter multiple statements in the SQL Statements pane separated by go:
update titles
set price = 21.95
where pub_id = "1389"
go
update titles
set price = price + 2.05
where pub_id = "0736"
go
update titles
set price = price+2.0
where pub_id = "0877"
go

You then execute all three statements by clicking Execute SQL Statement on the toolbar (or by pressing F9). After execution, the commands remain in the SQL Statements pane. To clear this pane, press the Esc key.

You can roll back your changes by entering rollback and executing the statement.