Ispirer Website Ispirer Capabilities - DB2 Migration Free Trial


IBM DB2 - Identifiers

This article describes identifiers in DB2.

Identifiers rules

DB2 - Identifier
First Character An alphabetical character
Subsequent Characters Alphanumeric characters and the underscore (_)
Maximum Length 128 bytes

Schema name is limited to 30 bytes
Case Sensitivity Identifiers are not case sensitive, DB2 interprets them as uppercase
Standards ANSI SQL - $ is not allowed

Identifiers - Differences between DB2 and other Databases

Database Identifiers First Character Subsequent Characters Max Length
Oracle Oracle Identifiers No differences Allowed: $ and # 30
SQL Server SQL Server Identifiers Allowed: _ , @ and # Allowed: $, @ and # 128
MySQL MySQL Identifiers Allowed: digit Allowed: $ 64
PostgreSQL PostgreSQL Identifiers Allowed: _ Allowed: $ 63
Sybase ASE Sybase ASE Identifiers Allowed: _ , @ and # Allowed: $, @ and # 255
Sybase ASA Sybase ASA Identifiers Allowed: _ , $, @ and # Allowed: $, @ and # 128
Informix Informix Identifiers Allowed: _ Allowed: $ 128
Teradata Teradata Identifiers Allowed: _, $ and # Allowed: $ and # 30
HP Neoview HP Neoview Identifiers No differences No differences 128
Interbase/Firebird Interbase/Firebird Identifiers No differences Allowed: $ 67

Quoted or Delimited Identifiers

DB2 - Quoted Identifiers
Quotation Marks Double quotation marks (“”)
Characters 2 double quotes can be used to include a double quote
Maximum Length 128 bytes not including quotes
Case Sensitivity Case sensitive

Quoted Identifiers - Differences between DB2 and other Databases

Database Identifiers Quotation Marks Characters Case Sensitivity
Oracle Oracle Quoted Identifiers “” Any except quotes Case sensitive
SQL Server SQL Server Quoted Identifiers [] and “” Any except quotes Case insensitive
MySQL MySQL Quoted Identifiers `` and “” Any except quotes Case sensitive
PostgreSQL PostgreSQL Quoted Identifiers “” Any including quotes Case sensitive
Sybase ASE Sybase ASE Quoted Identifiers [] and “” Any except pound sign (#) as the first character Case insensitive
Sybase ASA Sybase ASA Quoted Identifiers [] and “” Any Case insensitive
Informix Informix Quoted Identifiers “” Any including quotes Case sensitive
Teradata Teradata Quoted Identifiers “” Any including quotes Case insensitive
HP Neoview HP Neoview Quoted Identifiers “” Any except at sign (@), forward slash (/),
circumflex character (^) as the first character
and space(s) as the last character(s)
Case sensitive
Interbase/Firebird Interbase/Firebird Quoted Identifiers “” Any character except space(s) as the last character(s) Case sensitive

© 1999-2024, Ispirer Systems, LLC. All Rights Reserved.