Search
 
SCRIPT & CODE EXAMPLE
 

SQL

get all tables postgres

SELECT * FROM pg_catalog.pg_tables;
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

show tables postgresql

SELECT *
FROM INFORMATION_SCHEMA.tables
where table_schema = 'public';
Comment

list all tables in postgres schema

dt schema_name.*
Comment

show all tables postgres

dt
# show list of tables in postgres
Comment

psql list tables in schema

=> dt *.*
Comment

psql list tables in schema

=> dt public.*
Comment

list all tables in postgres

c database_name

dt
Comment

PREVIOUS NEXT
Code Example
Sql :: failed to connect to mysql at localhost:3306 with user root 
Sql :: mysql age by birthdate 
Sql :: between sql server 
Sql :: json with root element in sql server 
Sql :: sql inner join with where clause 
Sql :: truncate all tables 
Sql :: how to combine 2 tables in mysql 
Sql :: raiserror nowait sql server 
Sql :: How to drop procedures in mysql ? 
Sql :: get week day from date in sql 
Sql :: set value to null sql 
Sql :: oracle index size 
Sql :: postgresql filter on 
Sql :: bigquery add days to date 
Sql :: data formate in sql 
Sql :: WHERE not regex in SQL 
Sql :: q operator in oracle 
Sql :: SQL Add Column in a Table 
Sql :: sequence postgresql 
Sql :: charindex 
Sql :: find all tables with column name 
Sql :: sql server current time without date 
Sql :: sql pass table name as variable 
Sql :: sql oracle update multiple rows 
Sql :: create table from existing table in sql 
Sql :: union vs intersect sql 
Sql :: postgressum when 
Sql :: consecutive numbers sql 
Sql :: docker add mysql to image 
Sql :: Write an SQL query to fetch worker names with salaries = 50000 and <= 100000. 
ADD CONTENT
Topic
Content
Source link
Name
9+3 =