Session Modes in Teradata
Last updated
Last updated
The Teradata database has different modes for running queries: ANSI Mode (rules based on the ANSI SQL: 2011 specifications) and TERA mode (rules defined by Teradata). Please review the following for more information.
For strings, the Teradata Mode works differently. As it is explained in the following table based on the :
Default attribute for character comparisons
CASESPECIFIC
NOT CASESPECIFIC
Default TRIM behavior
TRIM(BOTH FROM)
TRIM(BOTH FROM)
ANSI Mode
CASESPECIFIC
CASESPECIFIC
No constraint added.
NOT CASESPECIFIC
CASESPECIFIC
Add COLLATE 'en-cs'
in column definition.
Teradata Mode
CASESPECIFIC
CASESPECIFIC
In most cases, do not add COLLATE, and convert its usages of string comparison to RTRIM( expression )
NOT CASESPECIFIC
NOT CASESPECIFIC
In most cases, do not add COLLATE, and convert its usages of string comparison to RTRIM(UPPER( expression ))