\d users

Category: Databases & SQL

\d users

Describe a table's columns and constraints

Shows the users table's columns with their types, nullability, defaults, and index or foreign-key notes. \d+ adds storage details like table size. It is the psql equivalent of DESCRIBE in MySQL. Related: \dt lists all tables.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.