MySQL Forums
Forum List  »  Newbie

Re: Data object standards
Posted by: Peter Brawley
Date: January 18, 2010 10:47AM

For our book we collected these rules about identifiers:

• In the first character position, MySQL accepts an alphanumeric, '_' or '$', but some RDBMSs forbid digits here, so for portability do not use them.

• The first character of the name of a database, table, column or index may be followed by any character allowed in a directory name to a maximum length of 64, or 255 for aliases. For portability, a safe maximum is 30.

• Identifiers can be qualified (tblname.colname), and quoted by backticks (`tblname`) or by double quotes if sql_mode includes ansi_quotes.

• Identifiers not quoted as above cannot be case-insensitive-identical with any reserved word.

http://dev.mysql.com/doc/mysqld-version-reference/en/mysqld-version-reference-reservedwords.html points to version-specific lists of reserved words.

PB
http://www.artfulsoftware.com

Options: ReplyQuote


Subject
Written By
Posted
January 13, 2010 11:44AM
January 15, 2010 01:16AM
January 18, 2010 03:48AM
Re: Data object standards
January 18, 2010 10:47AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.