JournalSQLSetup and posting1 min
Most Common Commands You Will Need in PostgreSQL Shell
You can use SQL shell commands for PostgreSQL to display details about your database, its tables, and column properties.
- psql
- \dt
- \d
- \l
You Can Use SQL Shell Commands for PostgreSQL
To Display Details About Your Database, Its Tables, and Column Properties
To list the databases stored on your server
\lTo list tables across all schemas/databases
\dt *.*To list tables in a specific schema/database
\dt database_nameTo list columns of a specific table
\d database_name.table_nameOr you can connect to the database
\c database_nameThen list the columns like this
\d table_name