title: SQL, How to change column in SQL table without breaking other dependencies?
body: <p>I'm sure this might be quite common query but couldn't find good answer as for now.</p>
  
  <p>Here is my question:</p>
  
  <p>I've got a table named <b>Contacts</b> with varchar column <b>Title</b>. Now in the middle of development I want to replace field <b>Title</b> with <b>TitleID</b> which is foreign key to <b>ContactTitles</b> table. At the moment table <b>Contacts</b> has over 60 dependencies (other tables, views functions).</p>
  
  <p>How can I do that the safest and easiest way?</p>
  
  <p>We use: MSSQL 2005, data has already been migrated, just want to change schema.</p>
  
  <p><b>Edit:</b></p>
  
  <p>Thanks to All for quick replay.</p>
  
  <p>Like it was mentioned <b>Contacts</b> table has over 60 dependents, but when following query was run, only 5 of them use <b>Title</b> column. Migration script was run, so no data changes required.</p>
  
  <p><code>
  /*gets all objects which use specified column */
  </code></p>
  
  <p><code>
  SELECT Name
  FROM syscomments sc
  JOIN sysobjects so ON sc.id = so.id
  WHERE TEXT LIKE '%Title%' AND TEXT LIKE '%TitleID%'
  </code></p>
  
  <p>Then I went through those 5 views and updated them manually.</p>