Press "Enter" to skip to content

Multiple Operations Per Command

Louis Davidson points out a potential query writing time-saver:

But then I saw Mike use the following syntax (sans PROFILE and XML):

SET STATISTICS IO, TIME, PROFILE, XML ON;
GO
SELECT *
FROM   dbo.Table1;
GO
SET STATISTICS IO, TIME, PROFILE, XML OFF;

Wow, that is a lot easier! (And yeah, using SQL Prompt I can set a snippet to take away typing, but this saves space in any case.)

Read on for more examples.