Auto Number in Make Table Query SQL

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is it possible to create a table with the "Select Into..." SQL statement so
that when the table is created, the autonumber is already created (with a
starting value of 1)?

I don't want to create the autonumber after the table is created, rather I
want the SQL statement to do it for me.

Thanks
 
sherwinb said:
Is it possible to create a table with the "Select Into..." SQL statement so
that when the table is created, the autonumber is already created (with a
starting value of 1)?

I don't want to create the autonumber after the table is created, rather I
want the SQL statement to do it for me.


No. If the source table has an autonumber field, those
values will be copied to the new table. If it doesn't have
one, there there is no way for the new table to know that
you would like one to be created.

You can get that effect by creating the new table with all
its fields and their attributes first and then using an
Append type query. You can pre-create a "template" table
with no data and then use CopyObject to make a working copy.
 
Back
Top