Answers for "postgres find name of columns"

SQL
1

postgres get columns names

SELECT *
  FROM information_schema.columns
 WHERE table_name   = 'your_table'
     ;
Posted by: Guest on March-12-2021
3

search for column name in psql

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;
Posted by: Guest on January-06-2021

Code answers related to "postgres find name of columns"

Code answers related to "SQL"

Browse Popular Code Answers by Language