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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Identity on MS Access

Status
Not open for further replies.

octane

Programmer
Aug 19, 2001
12
MX
My sql script look like this
create table ENVIO
(
ID Integer not null,
CLAVE_REM Integer not null,
CLAVE_DES Integer not null,
FECHA DateTime not null ,
GUIA Integer null ,
AUTORIZO Text(30) not null,
DEPTO Text(30) not null ,
PAGA Text(30) not null ,
DESCRIPCION Memo null
);

I need the field ID be autonumber type, I know that SQL has IDENTITY but in MS Access the only thing that I get is an error.

create table ENVIO
(
ID Integer IDENTITY not null,
CLAVE_REM Integer not null,
CLAVE_DES Integer not null,
FECHA DateTime not null ,
GUIA Integer null ,
AUTORIZO Text(30) not null,
DEPTO Text(30) not null ,
PAGA Text(30) not null ,
DESCRIPCION Memo null
);

Does any one know how to create a Auntonumber field with a SQL script???
 
I think that you will find your answer here. Good luck





The following CREATE TABLE statements show the synonyms of the COUNTER data type that can be used to create a table through the Access SQL View user interface.

CREATE TABLE tblUICounterDataTypes (
Field1 COUNTER,
Field2 TEXT(10))

Note that since the seed and increment values were not specified, they each defaulted to 1. Another way to declare a COUNTER data type is to use the AUTOINCREMENT keyword, like this:

CREATE TABLE tblUICounterDataTypes (
Field1 AUTOINCREMENT(10,5),
Field2 TEXT(10))
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top