Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

create identity column 1

Status
Not open for further replies.

jel

Programmer
Feb 17, 2002
349
NL
Hi there,
Anybody knows how to create a table with an identy-column using jet-sql?
In t-sql it would be:
CREATE TABLE test(field1 INT IDENTITY, ...)
I googled up:
CREATE TABLE test(field1 INT IDENTITY (1, 1), ...)
but it doesn't work...
 
CREATE TABLE text (field1 Autoincrement, )

will create a field called Field1 of Autonumber type.

For more details of data types to use, search for "Equivalent ANSI SQL Data types" in Access help.

John
 
Another way(more flexible):
CREATE TABLE test(field1 COUNTER(1,1), ...)

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top