The maximum possible length of an identifier depends on the programming language and environment:
- C language: According to the C99 standard, the minimum required significant length is 31 characters for external identifiers and 63 characters for internal identifiers or macro names. However, compilers may support longer lengths, and implementations should avoid fixed limits if possible
- MATLAB: The maximum identifier length can be configured between 31 and 256 characters, with 31 being the default. This is to accommodate hierarchical model names and name mangling in code generation
- MySQL: Identifiers such as database, table, column, and index names have a maximum length of 64 characters, while aliases can be up to 256 characters
- Oracle Database: Prior to version 12.2, the limit was 30 characters; from version 12.2 onwards, the default limit is 128 characters for identifiers like table and column names
- Python: There is effectively no fixed maximum length for identifiers in Python; identifiers can be of any length, limited only by available memory or practical considerations. Some sources mention a conventional line length limit of 79 characters for code style, but this is unrelated to identifier length restrictions
- JavaScript (ESLint): While not a language limit, style rules often enforce minimum and maximum identifier lengths for readability, but these are configurable and not language-imposed
Summary Table
Language/Environment| Maximum Identifier Length
---|---
C (C99 standard)| At least 31 (external), 63 (internal)
MATLAB| 31 (default) to 256 (configurable)
MySQL| 64 (most identifiers), 256 (alias)
Oracle DB| 30 (pre-12.2), 128 (12.2 and later)
Python| Unlimited (practically no fixed limit)
JavaScript (ESLint)| Configurable style limits only
Thus, the maximum possible length of an identifier varies widely by language and system, with Python notably allowing identifiers of unlimited length. For C and other compiled languages, standards specify minimum significant lengths but actual limits depend on compiler implementations. Database systems impose their own limits for schema object names.