...

View Full Version : Create Table



castali
03-12-2004, 10:01 AM
I want to create a table (for access 2000) and that the PRIMARY KEY is num auto (auto increment)

CREATE TABLE option (id_options int PRIMARY KEY,options char(50),valeurs char(100));

what is the syntax for it ?

I want also a null allowed and not null allowed and this does not work

CREATE TABLE option (id_options int PRIMARY KEY,options char(50) NOT NULL,valeurs char(100) NULL);

thank you

A1ien51
03-12-2004, 07:14 PM
Need to use Identity......



CREATE TABLE table_name(
ColumnID int NOT NULL IDENTITY(1, 1)
)



Eric

castali
03-12-2004, 09:57 PM
I just go tit working in that way

CREATE TABLE options (id_options COUNTER PRIMARY KEY,options char(50) NOT NULL,valeurs char(100) NOT NULL,description char(255) NULL);

With COUNTER , but I shall try your IDENTITY

thank you



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum