Showing posts with label tells. Show all posts
Showing posts with label tells. Show all posts

Sunday, February 19, 2012

Accessing the name of all the related tables name

Hi Everyone,

I would like to ask a question, Is there any way or tool available in the sql server 2000, that tells the user, how many tables contains the same column name (such as Col_N, is a primary key and I want to know all the table names that have the same Foreign key (COL_N)).

If anybody knows that, pls help me.

Thanking you

Gaurav

Using SQL 2000, you may wish to examine the Information_Schema views for a list of which tables contain a particular column, such as:

SELECT Table_Name
FROM Information_Schema.Columns
WHERE Column_Name = @.x