A month or two back I posted a question asking if an AutoIncrement
column in a multicolumn index was supposed to work. At the time, I had
accidently produced the intended effect, and couldn't duplicate it.

Today, while browsing the MySQL docs, I discovered how to do it
properly, and thought those who don't know how it works might want to
know.

The key (no pun intended) to getting it to work is twofold.
First, the table type must be MyISAM or BDB.
Second, it will maintain a seperate autoincrement for every unique
/prefix/ or, in plain english, for every unique combination of values in
the columns that come /before/ the AutoIncrement column in the index.

Hope this helps someone. I know it's going to help me significantly.

Matthew Walker



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to