| title | SET PARSEONLY (Transact-SQL) | ||||||
|---|---|---|---|---|---|---|---|
| description | Examines the syntax of each Transact-SQL statement and returns any error messages without compiling or executing the statement. | ||||||
| author | WilliamDAssafMSFT | ||||||
| ms.author | wiassaf | ||||||
| ms.reviewer | randolphwest | ||||||
| ms.date | 06/06/2023 | ||||||
| ms.service | sql | ||||||
| ms.subservice | t-sql | ||||||
| ms.topic | reference | ||||||
| ms.custom |
|
||||||
| f1_keywords |
|
||||||
| helpviewer_keywords |
|
||||||
| dev_langs |
|
||||||
| monikerRange | >=aps-pdw-2016 || =azuresqldb-current || =azure-sqldw-latest || >=sql-server-2016 || >=sql-server-linux-2017 || =azuresqldb-mi-current || =fabric || =fabric-sqldb |
[!INCLUDE sql-asdb-asdbmi-asa-pdw-fabricse-fabricdw-fabricsqldb]
Examines the syntax of each [!INCLUDEtsql] statement and returns any error messages without compiling or executing the statement.
:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: Transact-SQL syntax conventions
SET PARSEONLY { ON | OFF }
[ ; ]
When SET PARSEONLY is ON, [!INCLUDEssNoVersion] only parses the statement. When SET PARSEONLY is OFF, [!INCLUDEssNoVersion] 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.
Requires membership in the public role.