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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top