SET PARSEONLY (Transact-SQL)
Applies to: SQL Server Azure SQL Database Azure SQL Managed Instance Azure Synapse Analytics Analytics Platform System (PDW) SQL analytics endpoint in Microsoft Fabric Warehouse in Microsoft Fabric
Examines the syntax of each Transact-SQL statement and returns any error messages without compiling or executing the statement.
Transact-SQL syntax conventions
Syntax
SET PARSEONLY { ON | OFF }
[ ; ]
Note
To view Transact-SQL syntax for SQL Server 2014 (12.x) and earlier versions, see Previous versions documentation.
Remarks
When SET PARSEONLY
is ON
, SQL Server only parses the statement. When SET PARSEONLY
is OFF
, SQL Server compiles and executes the statement.
The setting of SET PARSEONLY
is set at parse time and not at execute or run time.
Don't use PARSEONLY
in a stored procedure or a trigger. SET PARSEONLY
returns offsets if the OFFSETS
option is ON
and no errors occur.
Permissions
Requires membership in the public role.
See also
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for