title: SQL 2000: T-SQL to get foreign key relationships for a table
body: <p>Similar but NOT IDENTICAL to <a href="https://stackoverflow.com/questions/444523/sql-server-2000-query-a-tables-foreign-key-relationships">SQL Server 2000 - Query a Table’s Foreign Key relationships</a></p>
  
  <p>I need a T-SQL statement that will work SQL 2000 that given a table name, will return the foreign key relationships for that table e.g.</p>
  
  <p>Table MyFristTable has a foreign key to MySecondTable, where MyFirstTable.ColA must be in MySecondTable.ColB. I'd be delighted, if the sql statement (or stored proc) is ran for MyFirstTable and returned a result set on the lines of</p>
  
  <pre><code>Column | FK_Table      | FK_COLUMN
  ----------------------------------
  ColA   | MySecondTable | ColB
  </code></pre>
  
  <p><strong>NB</strong>: I have samples for SQL 2005 that won't work because they rely on sys.foreign_key_columns</p>
  
  <p>I'd rather not have to parse out the results of the sp_help statement.</p>
  
  <p>Thanks,</p>