Search
 
SCRIPT & CODE EXAMPLE
 

SQL

count column of tables psql

1
2
3
4
select table_name, count(*) as column_count 
from information_schema."columns"
where table_schema = 'public' 
GROUP by table_name order by column_count desc;
Comment

PREVIOUS NEXT
Code Example
Sql :: postgres concat 
Sql :: savepoint in sql 
Sql :: oracle nextval 
Sql :: sql extract numbers from string 
Sql :: sql get last inserted row 
Sql :: error code 1451 sql 
Sql :: row number mssql 
Sql :: delete join select from one table based on multiple values 
Sql :: how to create a table in mysql 
Sql :: username sql 
Sql :: mysql count with if 
Sql :: sql case 
Sql :: sql pagination oracle 
Sql :: mysql ip address data type 
Sql :: wildcard in sql 
Sql :: unsigned int in mysql 
Sql :: delete all value query 
Sql :: sql table 
Sql :: add column postgres with default value 
Sql :: copy value from one column to another postgres 
Sql :: get foreign table names mysql 
Sql :: psql create user 
Sql :: postgresql Create a new role with a username and password 
Sql :: sql change date format 
Sql :: mysql backup database 
Sql :: Inner join - to join 3 tables - https://www.postgresqltutorial.com/postgresql-tutorial/postgresql-inner-join/ 
Sql :: postgres update multiple columns 
Sql :: current date in sql 
Sql :: how to set a column as unique in sql server 
Sql :: installing mysql on centos 7 
ADD CONTENT
Topic
Content
Source link
Name
2+9 =