Teradata - NOT CASESPECIFIC and CASESPECIFIC - Data Type Attributes

NOT CASESPECIFIC (abbreviated form - NOT CS) attribute specifies that string comparison is case-insensitive, while CASESPECIFIC (CS) specifies case-sensitive comparison.

Quick Example:

   -- Create a table with one column case-insensitive, another column case-sensitive
   CREATE TABLE cities
   (
      name VARCHAR(80) NOT CASESPECIFIC,
      name2 VARCHAR(80) CASESPECIFIC
   );
 
   -- Insert a row
   INSERT INTO cities VALUES ('San Diego', 'San Diego');
 
   -- Name column is case-insensitive
   SELECT * FROM cities WHERE name = 'SAN DIEGO';
   -- Output: San Diego
 
   -- Name2 column is case-sensitive
   SELECT * FROM cities WHERE name2 = 'SAN DIEGO';
   -- No rows found

NOT CASESPECIFIC and CASESPECIFIC Overview

Summary information:

Syntax [NOT] CASESPECIFIC | CS
Default Teradata Mode NOT CASESPECIFIC
ANSI Mode CASESPECIFIC
Alternatives User UPPER or LOWER functions
(CASESPECIFIC) and (NOT CASESPECIFIC) expression predicates

Last Update: Teradata 13.0

Teradata Resources