0

I'm not sure if I'm going the right way about this but I want to create another table with an auto increment ID.

I created another table but how do I add the columns from the first table into the new table and an auto increment ID?

1 Answers1

0

Basically this is the same as copying any table into another table, just be sure not to specify the ID column.

INSERT INTO newTable (col1, col2, col3)
SELECT column1, column2, column3
FROM oldTable

See also: Copy data into another table

Nathan Hinchey
  • 1,191
  • 9
  • 30