Showing posts with label thanx. Show all posts
Showing posts with label thanx. Show all posts

Monday, February 13, 2012

Auto Number SQL Server 2000

Hi all,

How can i generate auto Number in SQL Server 2000,like AutoNumber Datatype in MsAccess...

Thanx in advance

Sajjad

UseIDENTITY

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_create2_8g9x.asp

|||

Hi

Here is how you can do that with WebMatrix, from theGuided Tour

Using IsIdentity

Sunday, February 12, 2012

Auto increment data field

Hi gurus,
Does anyone know how to reset the counter of an auto increment field without
deleting the table?
Thanx in advance..
Boristry
dbbc checkident with the reseed option... It is doc'd in books on line.
--
Wayne Snyder, MCDBA, SQL Server MVP
Computer Education Services Corporation (CESC), Charlotte, NC
www.computeredservices.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Boris Condarco" <bcondarco@.hotmail.com> wrote in message
news:uiGBrAU0DHA.2360@.TK2MSFTNGP10.phx.gbl...
> Hi gurus,
> Does anyone know how to reset the counter of an auto increment field
without
> deleting the table?
> Thanx in advance..
> Boris
>|||If there is no data to keep, TRUNCATE TABLE tablename
"Boris Condarco" <bcondarco@.hotmail.com> wrote in message
news:uiGBrAU0DHA.2360@.TK2MSFTNGP10.phx.gbl...
> Hi gurus,
> Does anyone know how to reset the counter of an auto increment field
without
> deleting the table?
> Thanx in advance..
> Boris
>|||DBCC CHECKIDENT (TestTable, RESEED, 1)
Rohtash Kapoor
http://www.sqlmantra.com
"Boris Condarco" <bcondarco@.hotmail.com> wrote in message
news:uiGBrAU0DHA.2360@.TK2MSFTNGP10.phx.gbl...
> Hi gurus,
> Does anyone know how to reset the counter of an auto increment field
without
> deleting the table?
> Thanx in advance..
> Boris
>