Vikas-Amit Shareware Tech-Talk

On this blog you will find general information & articles related to Microsoft .Net Programming and SQL Server tweeks. Please feel free to browse around the different articles and information of this blog. If you find any incorrect information in any of my papers or articles on this site, please let me know about it. I'll either make the necessary corrections or try to accommodate your comments and their resolutions in the paper.

Friday, October 30, 2015

Set Auto-Seed Column to 1 without using TRUNCATE command on a table which is referenced in another table

DELETE FROM dbo.masterTbl;
DBCC CHECKIDENT ('dbo.masterTbl', RESEED, 0) -- will set IDENTITY count back to 0
Alternatively, you can drop the existing relational constraints, use TRUNCATE command and recreate relational constraints.


Posted by Vikas at 3:39 AM No comments:
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

Search This Blog

Blog Archive

  • ►  2017 (1)
    • ►  January (1)
  • ►  2016 (1)
    • ►  February (1)
  • ▼  2015 (1)
    • ▼  October (1)
      • Set Auto-Seed Column to 1 without using TRUNCATE c...
  • ►  2013 (1)
    • ►  September (1)
  • ►  2011 (1)
    • ►  January (1)
  • ►  2010 (3)
    • ►  April (1)
    • ►  January (2)
  • ►  2009 (7)
    • ►  May (1)
    • ►  April (1)
    • ►  March (1)
    • ►  February (2)
    • ►  January (2)
  • ►  2008 (6)
    • ►  October (1)
    • ►  September (4)
    • ►  August (1)
  • ►  2007 (11)
    • ►  November (2)
    • ►  October (1)
    • ►  June (1)
    • ►  May (7)

My Favorites

  • http://www.agrinei.com/gridviewhelper/gridviewhelper_en.htm
  • http://weblogs.asp.net
  • http://www.codeplex.com
  • http://www.dotnetcurry.com/
  • http://www.syncfusion.com/faq/aspnet/default.aspx
  • http://www.4guysfromrolla.com/
  • http://www.codeproject.com
  • http://www.15seconds.com
  • http://www.google.co.in/
Simple theme. Powered by Blogger.