Query below finds all tables that have 'ProductID' column.
select schema_name(t.schema_id) as schema_name, t.name as table_name from sys.tables t where t.object_id in (select c.object_id from sys.columns c where c.name = 'ProductID') order by schema_name, table_name;
- schema_name - name of schema of found table
- table_name - name of found table
- One row represents a table
- Scope of rows: all found tables
- Ordered by schema name
List of tables that have 'ProductID' column.