Skip to content

Latest commit

 

History

History
59 lines (45 loc) · 2.21 KB

set-parseonly-transact-sql.md

File metadata and controls

59 lines (45 loc) · 2.21 KB
title description author ms.author ms.reviewer ms.date ms.service ms.subservice ms.topic f1_keywords helpviewer_keywords dev_langs monikerRange
SET PARSEONLY (Transact-SQL)
Examines the syntax of each Transact-SQL statement and returns any error messages without compiling or executing the statement.
WilliamDAssafMSFT
wiassaf
randolphwest
06/06/2023
sql
t-sql
reference
PARSEONLY_TSQL
SET_PARSEONLY_TSQL
PARSEONLY
SET PARSEONLY
parsing [SQL Server], SET PARSEONLY statement
checking syntax
PARSEONLY option
syntax [SQL Server], verifying
verifying syntax
SET PARSEONLY statement
TSQL
>=aps-pdw-2016||=azuresqldb-current||=azure-sqldw-latest||>=sql-server-2016||>=sql-server-linux-2017||=azuresqldb-mi-current||=fabric

SET PARSEONLY (Transact-SQL)

[!INCLUDE sql-asdb-asdbmi-asa-pdw-fabricse-fabricdw]

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

Syntax

SET PARSEONLY { ON | OFF }
[ ; ]

[!INCLUDEsql-server-tsql-previous-offline-documentation]

Remarks

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.

Permissions

Requires membership in the public role.

See also