Thread: querying table structure/definition

querying table structure/definition

From
Andrew Gould
Date:
Hi all,

What psql or sql commands can be used to view the
structure of a table?

I've been reading through the documentation online and
can't find the answer.

Thanks,

Andrew Gould

__________________________________________________
Do You Yahoo!?
Send instant messages & get email alerts with Yahoo! Messenger.
http://im.yahoo.com/

Re: querying table structure/definition

From
Neil Conway
Date:
On Mon, Sep 25, 2000 at 01:54:09PM -0700, Andrew Gould wrote:
> What psql or sql commands can be used to view the
> structure of a table?

Using psql, try:

    \d table_name

For more psql commands, look at the output of '\?' from inside psql.

HTH,

Neil

--
Neil Conway <neilconway@home.com>
Get my GnuPG key from: http://klamath.dyndns.org/mykey.asc
Encrypted mail welcomed

Vegetarians do not love animals... they hate plants.

Attachment