Create Autonumber field in Query 
Author Message
 Create Autonumber field in Query

I want to create a table by using make-table query. But the autonumber field
needs to be added to the table. How can we add the autonumber field to the
table by using a make-table query?

Your help is appreciated.



Mon, 19 Sep 2005 05:33:33 GMT  
 Create Autonumber field in Query
Hi,

In Jet, you can't, natively, in one step; with MS SQL Server, use IDENTITY:

SELECT IDENTITY (int, 1, 1) AS Rank, discount
INTO #tempDiscounts
FROM discounts
ORDER BY discount ASC

With Jet, create the table first, with an autonumber, then, in a second step, append data to it,
without specifying anything to the autonumber field.

Hoping it may help,
Vanderghast, Access MVP

Quote:

> I want to create a table by using make-table query. But the autonumber field
> needs to be added to the table. How can we add the autonumber field to the
> table by using a make-table query?

> Your help is appreciated.



Mon, 19 Sep 2005 19:29:26 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Creating Autonumber field in queries

2. Create a field in a query that autonumbers

3. Query to create a table with Field data Type as AutoNumber

4. Autonumber field SQL create table query

5. How to create AUTONUMBER field in a query

6. Creating an autonumber field in a query.

7. Creating a counter/autonumber field in a query

8. Creating an AutoNumber Field Using CREATE TABLE(...)

9. How create autonumber field using CREATE TABLE ?

10. How to create a table with Autonumber field and hyperlink field using code


 
Powered by phpBB® Forum Software © phpBB Group