Databases often have standard columns. Examples of such standard columns can be id, modified_date, created_by or row_version.
Query below finds all tables that do not have a 'first_name' column.
select t.table_schema, t.table_name from v_catalog.tables t left join v_catalog.columns c on t.table_id = c.table_id and c.column_name like 'first_name' where column_name is null order by t.table_schema, t.table_name;
- table_schema - 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
These tables do not have a 'first_name' column.