use table metadata for select statement in SQL Server?

I have a large database and would like to select table names that have a certain column name. I have done something like this in MySQL, but can't find any info on SQL Server.

I want to do something like:


select [table] from [db] where table [has column 'classtypeid']

how can I do something like this?

This question and answers originated from www.stackoverflow.com
Question by (8/26/2008 1:20:57 PM)

Answer

Use the ANSI information_schema views, this will also work in MySQL

select table_name 
from information_schema.columns 
where column_name = 'classtypeid'
Answer by

Find More Answers
Related Topics  sql-server  query
Related Questions