Home > SQL Server > Compile SQL satements without execution – SET NOEXEC – SQL Server

Compile SQL satements without execution – SET NOEXEC – SQL Server


SET NOEXEC: This set statement configure the current SQL session to compile only mode. It helps developers to validate the syntax of the query and transact-sql by compiling the code and it will not execute.

Usage

SET NOEXEC  ON 
or
SET NOEXEC OFF
 

Example

1. NOEXEC set statement is on. In this example, I am executing a TSQL statement to create a procedure.

pic12. NOEXEC set statement is off. This select statement returns the result-set now.

pic2

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: