Click to See Complete Forum and Search --> : SQL question..


zebdaag
05-19-2004, 02:01 PM
I got this SQL txt:

SQL = "CREATE TABLE tabel_01( ID varchar, Webnaam varchar, Bezoeken integer)"

What I want now is that the column ID isn't varchar but it's a Auto numbering column. How can I do this...??

buntine
05-19-2004, 11:02 PM
You have to specify the Counter daya type. It takes two parameters, the starting number and the incremention.

SQL = "CREATE TABLE tabel_01( ID Counter(1,1), Webnaam varchar, Bezoeken integer)"

The preceding code tells the database application what you want to have an auto incrementing field which starts at one, and is incremented by one each time a record is entered.

Regards,
Andrew Buntine.