postgresql search all tables for column name

select t.table_schema,
       t.table_name
from information_schema.tables t
inner join information_schema.columns c on c.table_name = t.table_name 
                                and c.table_schema = t.table_schema
where c.column_name = 'last_name'
      and t.table_schema not in ('information_schema', 'pg_catalog')
      and t.table_type = 'BASE TABLE'
order by t.table_schema;
Code has been copied

Are there any code examples left?
Create a Free Account
Unlock the power of data and AI by diving into Python, ChatGPT, SQL, Power BI, and beyond.
Sign up
Develop soft skills on BrainApps
Complete the IQ Test
Relative searches
postgres column search in tables postgresql find table that have column names postgresql find all tables with column name postgresql find column name in all tables find tables with column name postgres postgres search for column name in all tables postgresql search table name postgresql search for table name psql search all columns with name find all tables with column name psql postgress search in all columns of table search column name in all tables postgres search field in all tables postgres how do we search thode tables where space coloums postgresql postgres search table per column name postgresql search all fields in a table search on all tables postgres 4 search for column name in psql psql list all tables with particular attribute name search in all columns names sql postgres postgres find column name field with name in all tables postgresql find find a column in all tables postgresql find a column in all tables postgres search for a column name in postgres select all tables with column name like postgresql how to find a column name in all tables in postgresql find column name in postgresql postgres find table with column name postgresql find field in all tables search column postgres search colum postgres postgres search database with name postgres find a column postgresql search column name in all tables postgres find table with column name reference in join psql find table with column name postgres use column name as schema postgres have column name as schema postgresql search all tables for column name
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source