Introduce DataBase,Asp.net,JavaScript,Xml,Html,Css,Sql,Php,ASP.NET Controls,AJAX,Tools,HTML,CSS,JavaScript,Open Source Project,WPF,.Net Framework,Linq
Top Recommended Hosting

The identity of my table

by the3factory 3/23/2008 3:27:00 AM
Question:

Hello,

I created a table with the identity column "ID". It will increase by 1 when I insert a row to the table.

However, when I wanted to publish my database with my application, I deleted all the rows in my table. At this time, I wanted the identity to begin with 1 again. Can I do it in sql server management studio or is there other ways to do it?

Thanks.

Answer1:

Give a look at DBCC CHECKIDENTITY in books online.  You ought to be able to do something like:

 

Code Snippet

Related posts

Sign up for PayPal and start accepting credit card payments instantly.


Powered by BlogEngine.NET 1.2.0.0