Show TOC

NON_KEYWORDS Option [TSQL]Locate this document in the navigation structure

Turns off individual keywords, allowing their use as identifiers.

Allowed Values

String

Default

'' (the empty string)

Scope

Option can be set at the database (PUBLIC) or user level. At the database level, the value becomes the default for any new user, but has no impact on existing users. At the user level, overrides the PUBLIC value for that user only. No system privilege is required to set option for self. System privilege is required to set at database level or at user level for any user other than self.

Requires the SET ANY PUBLIC OPTION system privilege to set this option. Can be set temporary for an individual connection or for the PUBLIC role. Takes effect immediately.

Remarks

NON_KEYWORDS turns off individual keywords. If you have an identifier in your database that is now a keyword, you can either add double quotes around the identifier in all applications or scripts, or you can turn off the keyword using the NON_KEYWORDS option.

This statement prevents TRUNCATE and SYNCHRONIZE from being recognized as keywords:

SET OPTION NON_KEYWORDS = 'TRUNCATE, SYNCHRONIZE'

Each new setting of this option replaces the previous setting. This statement clears all previous settings:

SET OPTION NON_KEYWORDS =

A side effect of the options is that SQL statements using a turned-off keyword cannot be used; they produce a syntax error.