T-SQL Tutorial

T-SQL SET Noexec


SET Noexec - sets the compile of each query but does not execute the queries.

SET Noexec Syntax:

SET NOEXEC { ON | OFF } ;

SET Noexec Example:

USE model;
GO
PRINT 'OK';
GO
SET NOEXEC ON;
GO
SELECT * FROM Departments WHERE id > 3;
GO
SET NOEXEC OFF;
GO

Messages
OK