1

I have been given project with over 500 tables with undocumented foreign key assignments. The main table is tblCompanies of which, I need to delete companies and all the related data in the other connected tables. Does anyone know of a tool or a method I could use to either accomplish or hunt down the order of deletion from these tables?

Edit: I am using SQL Server 2008.

chue x
  • 18,573
  • 7
  • 56
  • 70
Chris
  • 269
  • 2
  • 11
  • 2
    It will vary a lot depending on what DBMS you're using. Please update your question to let us know what it is. – Brian Willis Sep 26 '13 at 22:53
  • Google terms for such undertakings include "SQL Data Modeler" and "Reverse Engineering". Tools like GraphViz could help to visualize the relations. – Axel Kemper Sep 26 '13 at 22:57
  • Try the SQL query given in answer to this question. http://stackoverflow.com/q/483193/17776 – jac Nov 04 '13 at 23:12

0 Answers0