Skip to main content

ANSI compliance in Databricks Runtime

Applies to: check marked yes Databricks Runtime

This article describes ANSI compliance in Databricks Runtime. For ANSI mode in Databricks SQL, see ANSI_MODE.

Spark SQL has two options to support compliance with the ANSI SQL standard: spark.sql.ansi.enabled and spark.sql.storeAssignmentPolicy.

When spark.sql.ansi.enabled is set to true, Spark SQL uses an ANSI compliant dialect instead of being Hive compliant. For example, Spark will throw an exception at runtime instead of returning null results if the inputs to a SQL operator/function are invalid. Some ANSI dialect features may be not from the ANSI SQL standard directly, but their behaviors align with ANSI SQL’s style.

Moreover, Spark SQL has an independent option to control implicit casting behaviors when storing rows in a table. The casting behaviors are defined as store assignment rules in the standard.

When spark.sql.storeAssignmentPolicy is set to ANSI, Spark SQL complies with the ANSI store assignment rules. This is a separate configuration because its default value is ANSI, while the configuration spark.sql.ansi.enabled is disabled by default.

The following table summarizes the behavior:

Property NameDefaultMeaning
spark.sql.ansi.enabledfalseWhen true, Spark attempts to conform to the ANSI SQL specification:

- Throws a runtime exception if an overflow occurs in any operation on an integer or decimal field.
- Forbids using the reserved keywords of ANSI SQL as identifiers in the SQL parser.
spark.sql.storeAssignmentPolicyANSIWhen storing a value into a column with a different data type, Spark performs type conversion. There are three policies for the type coercion rules: ANSI, legacy, and strict.

- ANSI: Spark performs the type coercion as per ANSI SQL. In practice, the behavior is mostly the same as PostgreSQL. It disallows certain unreasonable type conversions such as converting string to int or double to boolean.
- legacy: Spark allows the type coercion as long as it is a valid Cast, which is very loose. For example, converting string to int or double to boolean is allowed. It is also the only behavior in Spark 2.x and it is compatible with Hive.
- strict: Spark doesn’t allow any possible precision loss or data truncation in type coercion, for example, converting double to int or decimal to double is not allowed.

The following subsections present behavior changes in arithmetic operations, type conversions, and SQL parsing when ANSI mode is enabled. For type conversions in Spark SQL, there are three kinds of them and this article will introduce them one by one: cast, store assignment and type coercion.

Arithmetic operations

In Spark SQL, arithmetic operations performed on numeric types (with the exception of decimal) are not checked for overflows by default. This means that in case an operation causes overflows, the result is the same with the corresponding operation in a Java or Scala program (For example, if the sum of 2 integers is higher than the maximum value representable, the result is a negative number). On the other hand, Spark SQL returns null for decimal overflows. When spark.sql.ansi.enabled is set to true and an overflow occurs in numeric and interval arithmetic operations, it throws an arithmetic exception at runtime.

SQL
-- `spark.sql.ansi.enabled=true`
> SELECT 2147483647 + 1;
error: integer overflow

-- `spark.sql.ansi.enabled=false`
> SELECT 2147483647 + 1;
-2147483648

Cast

When spark.sql.ansi.enabled is set to true, explicit casting by CAST syntax throws a runtime exception for illegal cast patterns defined in the standard, such as casts from a string to an integer.

The CAST clause of Spark ANSI mode follows the syntax rules of section 6.13 “cast specification” in ISO/IEC 9075-2:2011 Information technology — Database languages - SQL — Part 2: Foundation (SQL/Foundation), except it specially allows the following straightforward type conversions which are disallowed as per the ANSI standard:

  • NumericType <=> BooleanType
  • StringType <=> BinaryType

The valid combinations of source and target data type in a CAST expression are given by the following table. “Y” indicates that the combination is syntactically valid without restriction and “N” indicates that the combination is not valid.

SourceTargetNumericStringDateTimestampIntervalBooleanBinaryArrayMapStruct
NumericYYNNNYNNNN
StringYYYYYYYNNN
DateNYYYNNNNNN
TimestampNYYYNNNNNN
IntervalNYNNYNNNNN
BooleanYYNNNYNNNN
BinaryYNNNNNYNNN
ArrayNNNNNNNYNN
MapNNNNNNNNYN
StructNNNNNNNNNY
SQL
-- Examples of explicit casting

-- `spark.sql.ansi.enabled=true`
> SELECT CAST('a' AS INT);
ERROR: [CAST_INVALID_INPUT] The value 'a' of the type "STRING" cannot be cast to "INT" because it is malformed.

> SELECT CAST(2147483648L AS INT);
ERROR: [CAST_OVERFLOW] The value 2147483648L of the type "BIGINT" cannot be cast to "INT" due to an overflow.

> SELECT CAST(DATE'2020-01-01' AS INT)
ERROR: [DATATYPE_MISMATCH.CAST_WITH_FUNC_SUGGESTION] Cannot resolve "CAST(DATE '2020-01-01' AS INT)" due to data type mismatch: cannot cast "DATE" to "INT".

-- `spark.sql.ansi.enabled=false` (This is a default behavior)
> SELECT cast('a' AS INT);
null

> SELECT CAST(2147483648L AS INT);
-2147483648

> SELECT CAST(DATE'2020-01-01' AS INT);
null

Store assignment

The setting spark.sql.storeAssignmentPolicy defaults to ANSI. With this setting, when the data types of source values doesn’t match the target column types, Spark SQL automatically adds ANSI CAST clauses to the INSERT statement. During table insertion under this policy, Spark checks for and rejects invalid casts, throwing an exception to ensure data quality. This means if an insertion attempt fails due to a type mismatch, it will not result in any data being partially written to the table.

Examples:

SQL
-- spark.sql.storeAssignmentPolicy=ANSI
> CREATE TABLE test(i INT);
> INSERT INTO test VALUES (2147483648L);
ERROR: [CAST_OVERFLOW_IN_TABLE_INSERT] Fail to insert a value of "BIGINT" type into the "INT" type column `i` due to an overflow.

> INSERT INTO test VALUES ('a');
ERROR: [CAST_INVALID_INPUT ERROR] The value 'a' of the type "STRING" cannot be cast to "INT" because it is malformed

These examples show Spark SQL preventing incompatible data from being inserted, thereby maintaining data integrity.

When the spark.sql.storeAssignmentPolicy is set to LEGACY, Spark SQL reverts to the behavior prevalent up to Spark 2.x. In this mode, instead of using ANSI CAST, it applies legacy CAST operations. Under this policy, invalid casts during table insertions result in either NULL values or incorrect values being inserted, rather than throwing an exception. Examples:

SQL
-- spark.sql.storeAssignmentPolicy=LEGACY
> CREATE TABLE test(i INT);
> INSERT INTO test VALUES (2147483648L);
> INSERT INTO test VALUES ('a');
> SELECT * FROM test;

-- Results
-- -2147483648 (incorrect value due to overflow)
-- null (cannot cast 'a' to INT)

Type coercion

Type Promotion and Precedence

When spark.sql.ansi.enabled is set to true, Spark SQL uses several rules that govern how conflicts between data types are resolved. At the heart of this conflict resolution is the Type Precedence List which defines whether values of a given data type can be promoted to another data type implicitly.

Data typeprecedence list(from narrowest to widest)
ByteByte -> Short -> Int -> Long -> Decimal -> Float* -> Double
ShortShort -> Int -> Long -> Decimal-> Float* -> Double
IntInt -> Long -> Decimal -> Float* -> Double
LongLong -> Decimal -> Float* -> Double
DecimalDecimal -> Float* -> Double
FloatFloat -> Double
DoubleDouble
DateDate -> Timestamp
TimestampTimestamp
StringString
BinaryBinary
BooleanBoolean
IntervalInterval
MapMap**
ArrayArray**
StructStruct**
  • For least common type resolution float is skipped to avoid loss of precision.

** For a complex type, the precedence rule applies recursively to its component elements.

Special rules apply for the String type and untyped NULL. A NULL can be promoted to any other type, while a String can be promoted to any simple data type.

This is a graphical depiction of the precedence list as a directed tree: Graphical representation of precedence rules

Least Common Type Resolution

The least common type from a set of types is the narrowest type reachable from the precedence list by all elements of the set of types.

The least common type resolution is used to:

  • Decide whether a function expecting a parameter of a type can be invoked using an argument of a narrower type.
  • Derive the argument type for functions which expect a shared argument type for multiple parameters, such as coalesce, least, or greatest.
  • Derive the operand types for operators such as arithmetic operations or comparisons.
  • Derive the result type for expressions such as the case expression.
  • Derive the element, key, or value types for array and map constructors.

Special rules are applied if the least common type resolves to FLOAT. With float type values, if any of the types is INT, BIGINT, or DECIMAL the least common type is pushed to DOUBLE to avoid potential loss of digits.

SQL
-- The coalesce function accepts any set of argument types as long as they share a least common type.
-- The result type is the least common type of the arguments.
> SET spark.sql.ansi.enabled=true;

> SELECT typeof(coalesce(1Y, 1L, NULL));
BIGINT

> SELECT typeof(coalesce(1, DATE'2020-01-01'));
Error: Incompatible types [INT, DATE]

> SELECT typeof(coalesce(ARRAY(1Y), ARRAY(1L)));
ARRAY<BIGINT>

> SELECT typeof(coalesce(1, 1F));
DOUBLE

> SELECT typeof(coalesce(1L, 1F));
DOUBLE

> SELECT (typeof(coalesce(1BD, 1F)));
DOUBLE

-- The substring function expects arguments of type INT for the start and length parameters.
> SELECT substring('hello', 1Y, 2);
he

> SELECT substring('hello', '1', 2);
he

> SELECT substring('hello', 1L, 2);
Error: Argument 2 requires an INT type.

> SELECT substring('hello', str, 2) FROM VALUES(CAST('1' AS STRING)) AS T(str);
Error: Argument 2 requires an INT type.

SQL functions

The behavior of some SQL functions can be different under ANSI mode (spark.sql.ansi.enabled=true).

  • size: This function returns null for null input under ANSI mode.
  • element_at:
    • This function throws ArrayIndexOutOfBoundsException if using invalid indices.
    • This function throws NoSuchElementException if key does not exist in map.
  • elt: This function throws ArrayIndexOutOfBoundsException if using invalid indices.
  • make_date: This function fails with an exception if the result date is invalid.
  • make_timestamp: This function fails with an exception if the result timestamp is invalid.
  • make_interval: This function fails with an exception if the result interval is invalid.
  • next_day: This function throws IllegalArgumentException if input is not a valid day of week.
  • parse_url: This function throws IllegalArgumentException if an input string is not a valid url.
  • to_date: This function fails with an exception if the input string can’t be parsed, or the pattern string is invalid.
  • to_timestamp: This function fails with an exception if the input string can’t be parsed, or the pattern string is invalid.
  • to_unix_timestamp: This function fails with an exception if the input string can’t be parsed, or the pattern string is invalid.
  • unix_timestamp: This function fails with an exception if the input string can’t be parsed, or the pattern string is invalid.

SQL operators

The behavior of some SQL operators can be different under ANSI mode (spark.sql.ansi.enabled=true).

  • array_col[index]: This operator throws ArrayIndexOutOfBoundsException if using invalid indices.
  • map_col[key]: This operator throws NoSuchElementException if key does not exist in map.
  • CAST(string_col AS TIMESTAMP): This operator fails with an exception if the input string can’t be parsed.
  • CAST(string_col AS DATE): This operator fails with an exception if the input string can’t be parsed.

Useful Functions for ANSI Mode

When ANSI mode is on, it throws exceptions for invalid operations. You can use the following SQL functions to suppress such exceptions.

  • try_cast: identical to CAST, except that it returns NULL result instead of throwing an exception on runtime error.
  • try_add: identical to the add operator +, except that it returns NULL result instead of throwing an exception on integral value overflow.
  • try_divide: identical to the division operator /, except that it returns NULL result instead of throwing an exception on dividing 0.

SQL keywords

When spark.sql.ansi.enabled is true, Spark SQL will use the ANSI mode parser. In this mode, Spark SQL has two kinds of keywords:

  • Reserved keywords: Keywords that are reserved and can’t be used as identifiers for table, view, column, function, alias, etc.
  • Non-reserved keywords: Keywords that have a special meaning only in particular contexts and can be used as identifiers in other contexts. For example, EXPLAIN SELECT ... is a command, but EXPLAIN can be used as identifiers in other places.

When the ANSI mode is disabled, Spark SQL has two kinds of keywords:

  • Non-reserved keywords: Same definition as the one when the ANSI mode enabled.
  • Strict-non-reserved keywords: A strict version of non-reserved keywords, which cannot be used as table alias.

By default spark.sql.ansi.enabled is false.

Below is a list of all the keywords in Spark SQL.

KeywordSpark SQL ANSI ModeSpark SQL Default ModeSQL-2016
ADDnon-reservednon-reservednon-reserved
AFTERnon-reservednon-reservednon-reserved
ALLreservednon-reservedreserved
ALTERnon-reservednon-reservedreserved
ALWAYSnon-reservednon-reservednon-reserved
ANALYZEnon-reservednon-reservednon-reserved
ANDreservednon-reservedreserved
ANTInon-reservedstrict-non-reservednon-reserved
ANYreservednon-reservedreserved
ARCHIVEnon-reservednon-reservednon-reserved
ARRAYnon-reservednon-reservedreserved
ASreservednon-reservedreserved
ASCnon-reservednon-reservednon-reserved
ATnon-reservednon-reservedreserved
AUTHORIZATIONreservednon-reservedreserved
BETWEENnon-reservednon-reservedreserved
BOTHreservednon-reservedreserved
BUCKETnon-reservednon-reservednon-reserved
BUCKETSnon-reservednon-reservednon-reserved
BYnon-reservednon-reservedreserved
CACHEnon-reservednon-reservednon-reserved
CASCADEnon-reservednon-reservednon-reserved
CASEreservednon-reservedreserved
CASTreservednon-reservedreserved
CHANGEnon-reservednon-reservednon-reserved
CHECKreservednon-reservedreserved
CLEARnon-reservednon-reservednon-reserved
CLUSTERnon-reservednon-reservednon-reserved
CLUSTEREDnon-reservednon-reservednon-reserved
CODEGENnon-reservednon-reservednon-reserved
COLLATEreservednon-reservedreserved
COLLECTIONnon-reservednon-reservednon-reserved
COLUMNreservednon-reservedreserved
COLUMNSnon-reservednon-reservednon-reserved
COMMENTnon-reservednon-reservednon-reserved
COMMITnon-reservednon-reservedreserved
COMPACTnon-reservednon-reservednon-reserved
COMPACTIONSnon-reservednon-reservednon-reserved
COMPUTEnon-reservednon-reservednon-reserved
CONCATENATEnon-reservednon-reservednon-reserved
CONSTRAINTreservednon-reservedreserved
COSTnon-reservednon-reservednon-reserved
CREATEreservednon-reservedreserved
CROSSreservedstrict-non-reservedreserved
CUBEnon-reservednon-reservedreserved
CURRENTnon-reservednon-reservedreserved
CURRENT_DATEreservednon-reservedreserved
CURRENT_TIMEreservednon-reservedreserved
CURRENT_TIMESTAMPreservednon-reservedreserved
CURRENT_USERreservednon-reservedreserved
DATAnon-reservednon-reservednon-reserved
DATABASEnon-reservednon-reservednon-reserved
DATABASESnon-reservednon-reservednon-reserved
DAYnon-reservednon-reservednon-reserved
DBPROPERTIESnon-reservednon-reservednon-reserved
DEFINEDnon-reservednon-reservednon-reserved
DELETEnon-reservednon-reservedreserved
DELIMITEDnon-reservednon-reservednon-reserved
DESCnon-reservednon-reservednon-reserved
DESCRIBEnon-reservednon-reservedreserved
DFSnon-reservednon-reservednon-reserved
DIRECTORIESnon-reservednon-reservednon-reserved
DIRECTORYnon-reservednon-reservednon-reserved
DISTINCTreservednon-reservedreserved
DISTRIBUTEnon-reservednon-reservednon-reserved
DIVnon-reservednon-reservednot a keyword
DROPnon-reservednon-reservedreserved
ELSEreservednon-reservedreserved
ENDreservednon-reservedreserved
ESCAPEreservednon-reservedreserved
ESCAPEDnon-reservednon-reservednon-reserved
EXCEPTreservedstrict-non-reservedreserved
EXCHANGEnon-reservednon-reservednon-reserved
EXISTSnon-reservednon-reservedreserved
EXPLAINnon-reservednon-reservednon-reserved
EXPORTnon-reservednon-reservednon-reserved
EXTENDEDnon-reservednon-reservednon-reserved
EXTERNALnon-reservednon-reservedreserved
EXTRACTnon-reservednon-reservedreserved
FALSEreservednon-reservedreserved
FETCHreservednon-reservedreserved
FIELDSnon-reservednon-reservednon-reserved
FILTERreservednon-reservedreserved
FILEFORMATnon-reservednon-reservednon-reserved
FIRSTnon-reservednon-reservednon-reserved
FNnon-reservednon-reservednon-reserved
FOLLOWINGnon-reservednon-reservednon-reserved
FORreservednon-reservedreserved
FOREIGNreservednon-reservedreserved
FORMATnon-reservednon-reservednon-reserved
FORMATTEDnon-reservednon-reservednon-reserved
FROMreservednon-reservedreserved
FULLreservedstrict-non-reservedreserved
FUNCTIONnon-reservednon-reservedreserved
FUNCTIONSnon-reservednon-reservednon-reserved
GENERATEDnon-reservednon-reservednon-reserved
GLOBALnon-reservednon-reservedreserved
GRANTreservednon-reservedreserved
GRANTSnon-reservednon-reservednon-reserved
GROUPreservednon-reservedreserved
GROUPINGnon-reservednon-reservedreserved
HAVINGreservednon-reservedreserved
HOURnon-reservednon-reservednon-reserved
IFnon-reservednon-reservednot a keyword
IGNOREnon-reservednon-reservednon-reserved
IMPORTnon-reservednon-reservednon-reserved
INreservednon-reservedreserved
INDEXnon-reservednon-reservednon-reserved
INDEXESnon-reservednon-reservednon-reserved
INNERreservedstrict-non-reservedreserved
INPATHnon-reservednon-reservednon-reserved
INPUTFORMATnon-reservednon-reservednon-reserved
INSERTnon-reservednon-reservedreserved
INTERSECTreservedstrict-non-reservedreserved
INTERVALnon-reservednon-reservedreserved
INTOreservednon-reservedreserved
ISreservednon-reservedreserved
ITEMSnon-reservednon-reservednon-reserved
JOINreservedstrict-non-reservedreserved
JSONnon-reservednon-reservednon-reserved
KEYnon-reservednon-reservednon-reserved
KEYSnon-reservednon-reservednon-reserved
LASTnon-reservednon-reservednon-reserved
LATERALreservedstrict-non-reservedreserved
LAZYnon-reservednon-reservednon-reserved
LEADINGreservednon-reservedreserved
LEFTreservedstrict-non-reservedreserved
LIKEnon-reservednon-reservedreserved
ILIKEnon-reservednon-reservednon-reserved
LIMITnon-reservednon-reservednon-reserved
LINESnon-reservednon-reservednon-reserved
LISTnon-reservednon-reservednon-reserved
LOADnon-reservednon-reservednon-reserved
LOCALnon-reservednon-reservedreserved
LOCATIONnon-reservednon-reservednon-reserved
LOCKnon-reservednon-reservednon-reserved
LOCKSnon-reservednon-reservednon-reserved
LOGICALnon-reservednon-reservednon-reserved
MACROnon-reservednon-reservednon-reserved
MAPnon-reservednon-reservednon-reserved
MATCHEDnon-reservednon-reservednon-reserved
MERGEnon-reservednon-reservednon-reserved
MINUTEnon-reservednon-reservednon-reserved
MINUSnon-reservedstrict-non-reservednon-reserved
MONTHnon-reservednon-reservednon-reserved
MSCKnon-reservednon-reservednon-reserved
NAMESPACEnon-reservednon-reservednon-reserved
NAMESPACESnon-reservednon-reservednon-reserved
NATURALreservedstrict-non-reservedreserved
NOnon-reservednon-reservedreserved
NOTreservednon-reservedreserved
NULLreservednon-reservedreserved
NULLSnon-reservednon-reservednon-reserved
OFnon-reservednon-reservedreserved
ONreservedstrict-non-reservedreserved
ONLYreservednon-reservedreserved
OPTIONnon-reservednon-reservednon-reserved
OPTIONSnon-reservednon-reservednon-reserved
ORreservednon-reservedreserved
ORDERreservednon-reservedreserved
OUTnon-reservednon-reservedreserved
OUTERreservednon-reservedreserved
OUTPUTFORMATnon-reservednon-reservednon-reserved
OVERnon-reservednon-reservednon-reserved
OVERLAPSreservednon-reservedreserved
OVERLAYnon-reservednon-reservednon-reserved
OVERWRITEnon-reservednon-reservednon-reserved
PARTITIONnon-reservednon-reservedreserved
PARTITIONEDnon-reservednon-reservednon-reserved
PARTITIONSnon-reservednon-reservednon-reserved
PERCENTnon-reservednon-reservednon-reserved
PIVOTnon-reservednon-reservednon-reserved
PLACINGnon-reservednon-reservednon-reserved
POSITIONnon-reservednon-reservedreserved
PRECEDINGnon-reservednon-reservednon-reserved
PRIMARYreservednon-reservedreserved
PRINCIPALSnon-reservednon-reservednon-reserved
PROPERTIESnon-reservednon-reservednon-reserved
PURGEnon-reservednon-reservednon-reserved
QUALIFYreservednon-reservedreserved
QUERYnon-reservednon-reservednon-reserved
RANGEnon-reservednon-reservedreserved
RECIPIENTnon-reservednon-reservednon-reserved
RECIPIENTSnon-reservednon-reservednon-reserved
RECORDREADERnon-reservednon-reservednon-reserved
RECORDWRITERnon-reservednon-reservednon-reserved
RECOVERnon-reservednon-reservednon-reserved
REDUCEnon-reservednon-reservednon-reserved
REFERENCESreservednon-reservedreserved
REFRESHnon-reservednon-reservednon-reserved
REGEXPnon-reservednon-reservednot a keyword
REMOVEnon-reservednon-reservednon-reserved
RENAMEnon-reservednon-reservednon-reserved
REPAIRnon-reservednon-reservednon-reserved
REPLACEnon-reservednon-reservednon-reserved
RESETnon-reservednon-reservednon-reserved
RESPECTnon-reservednon-reservednon-reserved
RESTRICTnon-reservednon-reservednon-reserved
REVOKEnon-reservednon-reservedreserved
RIGHTreservedstrict-non-reservedreserved
RLIKEnon-reservednon-reservednon-reserved
ROLEnon-reservednon-reservednon-reserved
ROLESnon-reservednon-reservednon-reserved
ROLLBACKnon-reservednon-reservedreserved
ROLLUPnon-reservednon-reservedreserved
ROWnon-reservednon-reservedreserved
ROWSnon-reservednon-reservedreserved
SCHEMAnon-reservednon-reservednon-reserved
SCHEMASnon-reservednon-reservednot a keyword
SECONDnon-reservednon-reservednon-reserved
SELECTreservednon-reservedreserved
SEMInon-reservedstrict-non-reservednon-reserved
SEPARATEDnon-reservednon-reservednon-reserved
SERDEnon-reservednon-reservednon-reserved
SERDEPROPERTIESnon-reservednon-reservednon-reserved
SESSION_USERreservednon-reservedreserved
SETnon-reservednon-reservedreserved
SETSnon-reservednon-reservednon-reserved
SHAREnon-reservednon-reservednon-reserved
SHARESnon-reservednon-reservednon-reserved
SHOWnon-reservednon-reservednon-reserved
SKEWEDnon-reservednon-reservednon-reserved
SOMEreservednon-reservedreserved
SORTnon-reservednon-reservednon-reserved
SORTEDnon-reservednon-reservednon-reserved
STARTnon-reservednon-reservedreserved
STATISTICSnon-reservednon-reservednon-reserved
STOREDnon-reservednon-reservednon-reserved
STRATIFYnon-reservednon-reservednon-reserved
STRUCTnon-reservednon-reservednon-reserved
SUBSTRnon-reservednon-reservednon-reserved
SUBSTRINGnon-reservednon-reservednon-reserved
SYNCnon-reservednon-reservednon-reserved
TABLEreservednon-reservedreserved
TABLESnon-reservednon-reservednon-reserved
TABLESAMPLEnon-reservednon-reservedreserved
TBLPROPERTIESnon-reservednon-reservednon-reserved
TEMPnon-reservednon-reservednot a keyword
TEMPORARYnon-reservednon-reservednon-reserved
TERMINATEDnon-reservednon-reservednon-reserved
THENreservednon-reservedreserved
TIMEreservednon-reservedreserved
TOreservednon-reservedreserved
TOUCHnon-reservednon-reservednon-reserved
TRAILINGreservednon-reservedreserved
TRANSACTIONnon-reservednon-reservednon-reserved
TRANSACTIONSnon-reservednon-reservednon-reserved
TRANSFORMnon-reservednon-reservednon-reserved
TRIMnon-reservednon-reservednon-reserved
TRUEnon-reservednon-reservedreserved
TRUNCATEnon-reservednon-reservedreserved
TRY_CASTnon-reservednon-reservednon-reserved
TYPEnon-reservednon-reservednon-reserved
UNARCHIVEnon-reservednon-reservednon-reserved
UNBOUNDEDnon-reservednon-reservednon-reserved
UNCACHEnon-reservednon-reservednon-reserved
UNIONreservedstrict-non-reservedreserved
UNIQUEreservednon-reservedreserved
UNKNOWNreservednon-reservedreserved
UNLOCKnon-reservednon-reservednon-reserved
UNSETnon-reservednon-reservednon-reserved
UPDATEnon-reservednon-reservedreserved
USEnon-reservednon-reservednon-reserved
USERreservednon-reservedreserved
USINGreservedstrict-non-reservedreserved
VALUESnon-reservednon-reservedreserved
VIEWnon-reservednon-reservednon-reserved
VIEWSnon-reservednon-reservednon-reserved
WHENreservednon-reservedreserved
WHEREreservednon-reservedreserved
WINDOWnon-reservednon-reservedreserved
WITHreservednon-reservedreserved
YEARnon-reservednon-reservednon-reserved
ZONEnon-reservednon-reservednon-reserved