View Full Version : Can't include a dash (-) in mySQL table names?
Why can't I include dashes?
Is it something wrong with phpMyAdmin or is it how mySQL is supposed to be?
Justin
02-19-2000, 10:00 PM
I'm pretty sure a hyphen is not allowed in a database, table, or column name... I have run into that limitation myself. Underscores are allowed though...
Hope this helps.
------------------
Justin Nelson
FutureQuest (http://www.FutureQuest.net/index.php) Support
Terra
02-19-2000, 10:27 PM
**Gleamed _directly_ from the MySQL Documentation**
Database, table, index, column and alias names all follow the same rules in MySQL:
A name may consist of alphanumeric characters from the current character set and also `_' and `$'. The default character set is ISO-8859-1 Latin1; this may be changed by recompiling MySQL. See section 9.1.1 The character set used for data and sorting.
A database, table, index or column name can be up to 64 characters long. An alias name can be up to 256 characters long.
A name may start with any character that is legal in a name. In particular, a name may start with a number (this differs from many other database systems!). However, a name cannot consist only of numbers.
It is recommended that you do not use names like 1e, because an expression like 1e+1 is ambiguous. It may be interpreted as the expression 1e + 1 or as the number 1e+1.
You cannot use the `.' character in names because it is used to extend the format by which you can refer to columns (see immediately below).
--
Terra
--A self-made systems engineer mostly from the zen of RTFM--
FutureQuest
vBulletin® v3.6.8, Copyright ©2000-2009, Jelsoft Enterprises Ltd.