How do you perform the equivalent of Oracle's DESCRIBE TABLE
in PostgreSQL (using the psql command)?
相关问题
- Django distinct is not working
- PostgreSQL: left outer join syntax
- Connecting Python to a Heroku PostgreSQL DB?
- PostgreSQL - Deleting data that are older than an
- Does PLV8 support making http calls to other serve
相关文章
- postgresql 关于使用between and 中是字符串的问题
- postgresql 月份差计算问题
- Using boolean expression in order by clause
- Table valued Parameter Equivalent in Postgresql
- in redshift postgresql can I skip columns with the
- Oracle equivalent of PostgreSQL INSERT…RETURNING *
- PostgreSQL field data type for IPv4 addresses
- Using prepared statement in stored function
You may do a
\d *search pattern *
with asterisks to find tables that match the search pattern you're interested in.You can also check using below query
Expmple : My table has 2 columns name and pwd. Giving screenshot below.
*Using PG admin3
In addition to the PostgreSQL way (\d 'something' or \dt 'table' or \ds 'sequence' and so on)
The SQL standard way, as shown here:
It's supported by many db engines.
Use the following SQL statement
If you replace tbl_name and col_name, it displays data type of the particular coloumn that you looking for.
Try this (in the
psql
command-line tool):See the manual for more info.
The psql equivalent of
DESCRIBE TABLE
is\d table
.See the psql portion of the PostgreSQL manual for more details.