There is a SQL Server 2008 database with a large number of tables. You need to get a list of all database tables that have a column called Recorder_TYPE
.
|
2 answers
select table_name from information_schema.columns where column_name='Recorder_TYPE'
|
select [Sch].[name] as [Schema], [Tab].[name] as [Table], [Col].[Name] as [Column] from sys.tables as [Tab] inner join sys.columns as [Col] on [Tab].[object_id] = [Col].[object_id] inner join sys.schemas as [Sch] on [Tab].[schema_id] = [Sch].[schema_id] where [Col].[Name] = 'Recorder_TYPE';
In the previous example, the result of the query will also be obtained "non-existent" temporary table View.
|