SSMS Searching for a Column

765 views Asked by At

How do I look for a certain column in a Database with 100+ tables?

For instance, in the frontend, I see a tab with displayed data..

A information with columns = email's, mailbox, note1, sent dt/tm, note2 etc.. but in the DB there are about 100+ Tables (messy), 

I just want to find the table that includes the columns of the A information with out expanding the columns of each table to investigate on where columns = email's, mailbox, note1, sent dt/tm, note2 etc.. Is there an easy way to do this on SQL Server Management studio?

2

There are 2 answers

0
Vinnie On BEST ANSWER

Try information schema:

Select *
From INFORMATION_SCHEMA.COLUMNS
Where Column_Name like '%Col%'
0
Lee On
sp_msforeachdb 'USE ?;  Select *
From INFORMATION_SCHEMA.COLUMNS
Where Column_Name like ''%Col%'''