How to display structure of a table

Started by Nageshwar Raoover 21 years ago3 messagesgeneral
Jump to latest
#1Nageshwar Rao
NageshwarR@PLANETASIA.COM

I have created a table and would like to display the structure to find out
datatype and length.
Just like in Oracle describe table_name;

#2Chris Green
chris@areti.co.uk
In reply to: Nageshwar Rao (#1)
Re: How to display structure of a table

On Thu, Nov 25, 2004 at 04:08:30PM +0530, Nageshwar Rao wrote:

I have created a table and would like to display the structure to find
out datatype and length.

Just like in Oracle describe table_name;

in psql:-

\dt

Basically the \d commands in psql give you much of what DESCRIBE does
for Oracle and mysql. \? to see all the \ commands.

--
Chris Green (chris@areti.co.uk)

"Never ascribe to malice, that which can be explained by incompetence."

#3Chris Green
chris@areti.co.uk
In reply to: Chris Green (#2)
Re: How to display structure of a table

On Thu, Nov 25, 2004 at 10:47:33AM +0000, Chris Green wrote:

On Thu, Nov 25, 2004 at 04:08:30PM +0530, Nageshwar Rao wrote:

I have created a table and would like to display the structure to find
out datatype and length.

Just like in Oracle describe table_name;

in psql:-

\dt

That's "\dt <tablename>" of course.

Basically the \d commands in psql give you much of what DESCRIBE does
for Oracle and mysql. \? to see all the \ commands.

--
Chris Green (chris@areti.co.uk)

"Never ascribe to malice, that which can be explained by incompetence."