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

CREATE QUERY WITH AUTONUMBER 1

Status
Not open for further replies.

100dtl

Programmer
Aug 18, 2003
313
GB
create table messages(id int,password text,ipaddress text)

I would like the first column ID to be autonumber.. is this possible? o
 
I think it's:


create table messages(id int autoincrement, password text,ipaddress text)
 
The correct syntax is just counter.

create table messages(id counter, password text,ipaddress text)

This will return the id as Autonumber.

Paul
 
Other solution :
create table messages(id AUTOINCREMENT,password text,ipaddress text)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top