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

list all tables in postgres

c database_name

dt
Comment

PREVIOUS NEXT
Code Example
Sql :: apex ORA-20999 
Sql :: apex select list ORA-20999 
Sql :: hw to delete a procedure in pl sql 
Sql :: sql for date greater than 
Sql :: oracle character index 
Sql :: mysql find non alphanumeric characters 
Sql :: mysql select from outside 
Sql :: mqtt Error: Address not available 
Sql :: oracle split string 
Sql :: set all the vluses in calumn in sql to false 
Sql :: drop table if exists oracle 
Sql :: importance of comment in mysql 
Sql :: last 6 months postgresql 
Sql :: laravel paginate raw sql 
Sql :: the package java.sql is not accessible 
Sql :: delete table sql 
Sql :: mysql with rollup 
Sql :: postgresql get year 
Sql :: login to database mysql terminal 
Sql :: oracle substring 
Sql :: mysql query unique column 
Sql :: psql: FATAL: Ident authentication failed for user "postgres" 
Sql :: oracle asynchronous query 
Sql :: sql server cannot create database diagram 
Sql :: sql server format datetime 
Sql :: update all rows mysql 
Sql :: mysql add fields 
Sql :: mysql get random data 
Sql :: postgres list all stored procedures query 
Sql :: oracle list duplicates 
ADD CONTENT
Topic
Content
Source link
Name
3+7 =