Обсуждение: Getting Column Information from a Table with psql

Поиск
Список
Период
Сортировка

Getting Column Information from a Table with psql

От
Kevin Lohka
Дата:
Is there any way to get the column information from a Table with psql?

I know it is possible to get a list of Tables in the database using \dt
is there a similar command for column information?

If not are there any alternatives?

Thanks for the help.

Kevin Lohka


Re: Getting Column Information from a Table with psql

От
Mohan
Дата:
Hi Kevin,
use
\d [Tablename]
to get the detalis of all the columns in the table.  It will also give the
Index, Primary key and Triger details.
Regards,
mohan

Kevin Lohka wrote:

> Is there any way to get the column information from a Table with psql?
>
> I know it is possible to get a list of Tables in the database using \dt
> is there a similar command for column information?
>
> If not are there any alternatives?
>
> Thanks for the help.
>
> Kevin Lohka
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
>                http://www.postgresql.org/docs/faqs/FAQ.html


Re: Getting Column Information from a Table with psql

От
daq
Дата:
KL> Is there any way to get the column information from a Table with psql?

KL> I know it is possible to get a list of Tables in the database using \dt
KL> is there a similar command for column information?

KL> If not are there any alternatives?

\d tablename

DAQ