Answers for "show table columns postgres"

SQL
2

how to list columns for particular tables in postgresql

SELECT *
  FROM information_schema.columns
 WHERE table_schema = 'your_schema'
   AND table_name   = 'your_table'
     ;
Posted by: Guest on June-17-2020
2

postgresql how to show table names

SELECT table_name
  FROM information_schema.tables
 WHERE table_schema='public'
   AND table_type='BASE TABLE';
Posted by: Guest on August-17-2021
1

view detailed table schema postgresql

-- All information
SELECT * FROM information_schema.columns
WHERE table_schema = 'some_schema'
AND TABLE_NAME = 'some_table';

-- Or a more simplified version

SELECT
   table_name,
   column_name,
   data_type
FROM
   information_schema.columns
WHERE
   table_name = 'some_table';
Posted by: Guest on July-30-2020
1

psql show columns of table

SELECT 
   table_name, 
   column_name, 
   data_type 
FROM 
   information_schema.columns
WHERE 
   table_name = 'city';Code language: SQL (Structured Query Language) (sql)
Posted by: Guest on July-16-2021
15

show table postgres command

PostgreSQL show tables command
	
\dt
Posted by: Guest on March-30-2020

Code answers related to "SQL"

Browse Popular Code Answers by Language