Finding Foreign Key Child Records In SQL Server

Foreign keys help to ensure referential integrity between tables.  In other words, parent records cannot be deleted if there are child records present.   This is a great thing and if you aren’t using foreign keys currently, you really should be.  While very helpful with referential integrity foreign keys can introduce slowness when deleting data, especially if you are wanting to delete the parent record.  In order for the transaction to complete, SQL Server has to check all foreign keys to make sure there aren’t any child records present.

Share

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Trust DCAC with your data

Your data systems may be treading water today, but are they prepared for the next phase of your business growth?

Denny Cherry & Associates Consulting
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.