Page is a not externally linkable
- Code, Content, and Presentation
-- Databases
---- keys and indexes question


coopster - 3:04 pm on Jan 24, 2011 (gmt 0)


Well, what is really odd to me is the specific note to which you draw attention. Typically the name of the INDEX/KEY is the first column name in the INDEX/KEY definition, as described in the MySQL documentation for CREATE TABLE Syntax [dev.mysql.com]:

In MySQL, the name of a PRIMARY KEY is PRIMARY. For other indexes, if you do not assign a name, the index is assigned the same name as the first indexed column, with an optional suffix (_2, _3, ...) to make it unique. You can see index names for a table using SHOW INDEX FROM tbl_name. See Section 12.4.5.23, "SHOW INDEX Syntax".


However, in your case it is not. It's almost like the table had a different definition at one point in time and has been altered since.


Thread source:: http://www.webmasterworld.com/databases_sql_mysql/4255898.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com