...

View Full Version : Add AutoNumber column in Access



bostjank
01-27-2003, 01:56 PM
hI!

Does anybody know hot to add AutoNumber column with SQL "Alter Table" or "Create Table" statement (for Access). I've been looking around, but haven't found the solution.

Thanks,
Bostjan

Roelf
01-27-2003, 02:16 PM
ALTER TABLE tablename ADD COLUMN columnname COUNTER

The counter datatype indicates an autonumber field

whammy
01-28-2003, 01:44 AM
Didn't know that - I know when creating tables in access that autoincrement works. Does this also work when adding the field on the fly?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum