Table of Contents
User Documentation
Ispirer Capabilities - MySQL Migration
Pricing
MySQL - Identifiers
This article describes identifiers in MySQL.
Identifiers rules
| MySQL - Identifier | |
|---|---|
| First Character | An alphanumeric character |
| Subsequent Characters | Alphanumeric characters, the underscore (_), dollar sign ($) |
| Maximum Length | 64 bytes Alias names are limited to 255 bytes |
| Case Sensitivity | Identifiers are not case sensitive for MySQL on Windows, and case sensitive for MySQL on Unix. Trigger names are case sensitive not depending on the platform |
| Standards | ANSI SQL - $ is not allowed |
Identifiers - Differences between MySQL and other Databases
| Database | Identifiers | First Character | Subsequent Characters | Max Length |
|---|---|---|---|---|
| Oracle | Oracle Identifiers | Not allowed: digit | Allowed: # | 30 |
| SQL Server | SQL Server Identifiers | Not allowed: digit Allowed: _, @ and # | Allowed: # and @ | 128 |
| IBM DB2 | IBM DB2 Identifiers | Not allowed: digit | Not allowed: $ | 128 |
| PostgreSQL | PostgreSQL Identifiers | Not allowed: digit Allowed: _ | No differences | 63 |
| Sybase ASE | Sybase ASE Identifiers | Not allowed: digit Allowed: _ , @ and # | Allowed: # and @ | 255 |
| Sybase ASA | Sybase ASA Identifiers | Not allowed: digit Allowed: _ , $, @ and # | Allowed: # and @ | 128 |
| Informix | Informix Identifiers | Not allowed: digit Allowed: _ | No differences | 128 |
| Teradata | Teradata Identifiers | Not allowed: digit Allowed: _, $ and # | Allowed: # | 30 |
| HP Neoview | HP Neoview Identifiers | Not allowed: digit | Not allowed: $ | 128 |
| Interbase/Firebird | Interbase/Firebird Identifiers | Not allowed: digit | No differences | 67 |
Quoted or Delimited Identifiers
| MySQL - Quoted Identifiers | |
|---|---|
| Quotation Marks | Back tick (``) |
| Characters | Any character except ASCII 0(0x00) or a byte with the value of 255 and the space in the end of database, table and column names |
| Maximum Length | 64 bytes not including quotes |
| Case Sensitivity | Case sensitive |
| Notes | When ANSI_QUOTES SQL mode is enabled it is also allowed to use double quotes (“”) to quote identifiers. |
Quoted Identifiers - Differences between MySQL 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 |
| IBM DB2 | IBM DB2 Quoted Identifiers | “” | Any including 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 |