In the company I work at, the database is massive. We have a lot of tables and sometimes when I am using SQL to search for something i.e. what status a particular Purchase Order is in. I often find that the column the status is stored in only contains a number (therefore the column is a foreign key).
Q: I'd like to know how to find the table where this foreign key referring to. Without using the diagram as its massive and I can't tell the relationships.
e.g.
Table: Purchase Orders
Column: PO_Status
PO_Status only contains number 1-10.
The name and description of the status is stored in another table and the number 1-10 is referring to that record in that other table. I want to know what that table name is.
This will help save a lot of time. Please Help!