Search
 
SCRIPT & CODE EXAMPLE
 

SQL

how to list columns for particular tables in postgresql

SELECT *
  FROM information_schema.columns
 WHERE table_schema = 'your_schema'
   AND table_name   = 'your_table'
     ;
Comment

list columns in table postgres

-- Good for quickly reminding you of what columns exist.
SELECT * FROM mytable WHERE 1=0;
Comment

list all tables and columns in postgresql

CREATE VIEW table_column_info AS

SELECT table_name, STRING_AGG(column_name, ', ') AS columns
FROM information_schema.columns
WHERE table_schema = 'public'
GROUP BY table_name;

SELECT * FROM table_column_info;
Comment

postgresql list columns

SELECT * FROM information_schema.columns 
WHERE table_schema = 'your_schema'
  AND table_name = 'your_table';
Comment

PREVIOUS NEXT
Code Example
Sql :: mysql convert timestamp to date 
Sql :: query to list all tables in sql database 
Sql :: mysql search for column name in all tables 
Sql :: cast string to datetime mysql 
Sql :: remove space in mysql 
Sql :: sql server check version 
Sql :: mysql update field from one table to another 
Sql :: c# datetime to sql server datetime 
Sql :: his is incompatible with sql_mode=only_full_group_by 
Sql :: sql query to make a existing column auto increment 
Sql :: sql server list table sizes 
Sql :: mysql interval 1 day 
Sql :: mysql modify foreign key 
Sql :: truncate table mysql 
Sql :: postgres stop server mac 
Sql :: oracle user last connected 
Sql :: how to change table name in sqlite 
Sql :: InnoDB: page_cleaner: 1000ms intended loop took 7742ms. The settings might not be optimal 
Sql :: postgres delete database 
Sql :: sql drop primary key 
Sql :: psql lst trigger 
Sql :: sql how to replace full stop 
Sql :: mysql get random row 
Sql :: day of the week sqlite 
Sql :: sql server add identity column to existing table 
Sql :: oracle sql drop table 
Sql :: create user mysql 
Sql :: oracle check numeric 
Sql :: How to disable foreign key checks ? 
Sql :: how to insert string variable into sqlite database 
ADD CONTENT
Topic
Content
Source link
Name
5+4 =