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 in MS Access with a SQL script???
 

Use the keyword Counter to create an Autonumber column.

create table ENVIO
(
ID Counter 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
);
Terry L. Broadbent
faq183-874 contains some tips and ideas for posting questions in these forums. Please review it and comment if you have time.
NOTE: Reference to the FAQ is part of my signature and is not directed at any individual.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top