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

Start AutoNumber at 0

Status
Not open for further replies.

acent

Technical User
Feb 17, 2006
247
US
I'm wondering, is it posible to start the autonumber at 0 instead of 1? Or, better said, can I assign a record to have a value of 0? I know I can import the data as a way to force the starting point, but I'm just not sure if the autonumber can contain a value of 0.

"God is a comedian playing to an audience too afraid to laugh."
-- Francois Marie Arouet (Voltaire)
 
I assume you're using autonumbering for your primary key. You can just type a 0 there on a new record. When you display the recordset in a form, it will start with 0.
 
ALTER TABLE yourTable ALTER COLUMN yourAutoNumber COUNTER(0,1);

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
I wonder if you know that, having started at 0, there is no guarantee that the next number will be 1, or even that it will be positive, depending on your set-up?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top