title: How to find out where reference to primary key is used in SQL Server?
body: <p>I have a table in SQL Server 2008 R2 with primary key called <code>ID</code> which then is used by multiple tables around the database as foreign key. How to find out by which tables it is used? I'm trying to delete that record but it's complaining that <code>ID</code> is in use. </p>
  
  <p>Or maybe there's an easy way to delete all referenced records from whole database just by giving database that <code>ID</code>? Right now I'm going for each table (that I know has that ID as foreign key) and deleting records that correspond to that particular ID but if there's better/simpler way to find it and delete all at once with simple code then that would best idea.</p>