[thelist] SQL Server auto-increment

Erik Goodlad erik at stirlingbridge.com
Fri Jan 19 18:04:31 CST 2001


When in "design mode" of your table:

Set the column you want to have the auto-increment to have these properties:

Datatype: int
Allow Nulls: Off
Identity: On
Identity Seed: The number you want the auto-number to start at (default 1)
Identity Increment: The interval you want the increment to be at (default 1)



Erik Goodlad
_________________________________________
The Stirling Bridge Group, LLC
*We Engineer Internet Business Solutions*
TEL: (949) 707-1534   FAX: (949) 707-1535




-----Original Message-----
From: thelist-admin at lists.evolt.org
[mailto:thelist-admin at lists.evolt.org]On Behalf Of sarah
Sent: Friday, January 19, 2001 2:28 PM
To: thelist at lists.evolt.org
Subject: [thelist] SQL Server auto-increment


I've been using Oracle for basically everything, but
we're switching to SQL Server because Oracle is pricey
and an overkill. I've been doing some research on SQL
Server to seek out problems with the transition and I
found one: Auto-incrementing numbers. Does SQL Server
have something like this? In Oracle I would just make
a sequence and have each new entry bump up one with
nextval. Even Access has that nice autonumber feature,
but I can't find something similar in SQL Server.
Anyone know of something, or a nice easy way to do
this?

Thanks a lot,
Sarah


__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices.
http://auctions.yahoo.com/

---------------------------------------
For unsubscribe and other options, including
the Tip Harvester and archive of TheList go to:
http://lists.evolt.org Workers of the Web, evolt !






More information about the thelist mailing list