在SQL Server中为select语句使用表元数据?

mma*_*tax 3 sql sql-server

我有一个大型数据库,并希望选择具有特定列名称的表名称.我在MySQL中做过类似的事情,但在SQL Server上找不到任何信息.

我想做的事情如下:

select [table] 
from [db] 
where table [has column 'classtypeid']
Run Code Online (Sandbox Code Playgroud)

我怎么能这样做?

SQL*_*ace 5

使用ANSI information_schema视图,这也适用于MySQL

select table_name 
from information_schema.columns 
where column_name = 'classtypeid'
Run Code Online (Sandbox Code Playgroud)