best would be to create the table ahead of time, inlcuding an auto_increment field, using an ordinary CREATE TABLE statement, then run an INSERT INTO ... SELECT ...
mysql has non-standard optional syntax CREATE TABLE SELECT so you can do both in one step, and it does let you declare an auto_increment at the same time -- it works, but i've not been able to avoid getting an extra null column in there
Bookmarks