Yogesh World

Monday, 13 June 2016

Cannot truncate table because it is being referenced by a FOREIGN KEY constraint



way to delete record without  disabling and enabling constraint

DELETE FROM TABLENAME
DBCC CHECKIDENT ('DATABASENAME.dbo.TABLENAME',RESEED, 0)
Posted by Yogesh at 08:21
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Blog Archive

  • ►  2017 (1)
    • ►  February (1)
  • ▼  2016 (11)
    • ►  December (1)
    • ►  November (2)
    • ▼  June (4)
      • Checking the transaction that is not yet Commit...
      • What is the difference between ports 465 and 587...
      • Cannot truncate table because it is being refere...
      • Find  all stored procedures or Function in a spe...
    • ►  May (1)
    • ►  April (2)
    • ►  March (1)
  • ►  2015 (6)
    • ►  December (4)
    • ►  September (2)
  • ►  2012 (1)
    • ►  May (1)

About Me

Yogesh
View my complete profile
Simple theme. Powered by Blogger.