NON_KEYWORDS Option [TSQL]

Turns off individual keywords, allowing their use as identifiers.

Allowed Values

String

Default

'' (the empty string)

Description

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.