OUPSSSS mauvais forum, désolé pour le message en anglais.
Is there a way for me to generate an auto_increment as a second column of the primary key in innodb? In documentation, it says that it only works for MyISAM and BDB. I need to assign a serie of schools to a student in order of preferences.
students: student int | username | lastname | firstname
schools: school int | name
students_schools: student | order int | school
In MyISAM, i would have:
primary key (student, order)
unique key (student, school)
I would prefer not having to generate the "order" myself, and use the auto_inc ability to just insert them in order. Am I out of luck?
Thanks for any tips,
Huu Da
MySQL flirter
Edited 1 time(s). Last edit at 07/25/2008 04:12PM by Huu Da Tran.