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

Compact and repair 1

Status
Not open for further replies.

JKingdom

Programmer
May 9, 2004
141
AE
hi ..

i was wondering how i can use a similar thing as (compact and repair database )utility what available in MS Access but in SQL .. coz i need to start the auto numbering from 1 again ..

thanks
 
access won't reset the autonumber to 1 unless the table is empty when you compact and repair, so you can do the same thing in sql server like this --

TRUNCATE TABLE tablename

this will reset its IDENTITY column to the original seed value

rudy | r937.com | Ask the Expert | Premium SQL Articles
SQL for Database-Driven Web Sites (next course starts May 8 2005)
 
thanks alot .. i'll do it this way . but if u know a way that i can do it throught the enterprise manager let me know .. thanks again ..
 
thanks .. i've done it through the query analyzer .. ;)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top