Naming Conventions for MySQL

For general information about this feature, see SAS Names and Support for DBMS Names.
MySQL database identifiers that you can name include databases, tables, and columns. They follow these naming conventions.
  • Aliases must be from 1 to 255 characters long. All other identifier names must be from 1 to 64 characters long.
  • Database names can use any character that is allowed in a directory name except for a period, a backward slash (\), or a forward slash (/).
  • By default, MySQL encloses column names and table names in quotation marks.
  • Table names can use any character that is allowed in a filename except for a period or a forward slash.
  • Table names must be 32 characters or less because SAS does not truncate a longer name. If you already have a table name that is greater than 32 characters, it is recommended that you create a table view.
  • Column names and alias names allow all characters.
  • Embedded spaces and other special characters are not permitted unless you enclose the name in quotation marks.
  • Embedded quotation marks are not permitted.
  • Case sensitivity is set when a server is installed. By default, the names of database objects are case sensitive on UNIX and not case sensitive on Windows. For example, the names CUSTOMER and Customer are different on a case-sensitive server.
  • A name cannot be a reserved word in MySQL unless you enclose the name in quotation marks. See the MySQL documentation for more information about reserved words.
  • Database names must be unique. For each user within a database, names of database objects must be unique across all users. For example, if a database contains a department table that User A created, no other user can create a department table in the same database.
    MySQL does not recognize the notion of schema, so tables are automatically visible to all users with the appropriate privileges. Column names and index names must be unique within a table.
For detailed information about naming conventions, see your MySQL documentation.