Specifies that character data for a column is stored as uppercase.
Also used in CAST and with Teradata conversion syntax to convert a value to uppercase.
UPPERCASE is a Teradata extension to the ANSI SQL:2011 standard.
The following rules apply to UPPERCASE in both ANSI and Teradata modes.
Note that the KANJI1 server character set only converts the 26 letters a‑z to uppercase.
If you declare a character column to be UPPERCASE and type ‘’ (GREEK SMALL LETTER ALPHA TONOS), then that character is translated and stored as ‘'Α’ (GREEK CAPITAL LETTER ALPHA TONOS).
The same applies to the (UC) qualifier.
The following SQL predicate evaluates to TRUE.
' (UC) = ''Α
The UPPER function is defined by the ANSI SQL:2011 standard and is not the same as declaring a value to be UPPERCASE. For further information, see “UPPER” in SQL Functions, Operators, Expressions, and Predicates.
The following table summarizes case criteria and issues.
UPPERCASE not specified
NOT CASESPECIFIC specified
The following are all equivalent as unique indexes:
Character data is stored in uppercase regardless of the case in which it was typed.
Because of the conversion, if a column is defined as UPPERCASE, characters typed as 'aaa' are stored as 'AAA' and therefore are equivalent to 'AAA' when used in a unique index.
The Sex column is created using the UPPERCASE option.
Sex CHAR UPPERCASE
If Sex data is entered in lowercase as shown in the following INSERT statement, then it is stored and returned in uppercase.
INSERT INTO Employee (Name, EmpNo, Sex ...
VALUES ('Smith', 10021, 'f', ...);
If used with the concatenation (||) operator, UC must be enclosed in parentheses, and be placed immediately after the column name.
SELECT (City_name (UC)) || ', ' || State, Population
WHERE Country = 'USA'
ORDER BY Population ;