Tuesday, August 18, 2009

Ever to find the table where a column is hiding in a giant DB?

I've been doing alot of this lately, being new to the CTSI db and such.

use this syntax, where 'yourcol' is the known column:

Select table_name from information_Schema.columns where column_name='yourCol'

or you can do a "like", like this:

Select table_name from information_Schema.columns where column_name like '%yourCol%'

No comments: