some questions

Started by Ang Tun Chekalmost 24 years ago3 messagesgeneral
Jump to latest
#1Ang Tun Chek
atchek@eware.com.my

hi
i am new to postresql and i need some help for some sql command

what is the sql command in postresql equal to "describe table"?

what is the sql command to list all tables in the database?

thank you

#2Nigel J. Andrews
nandrews@investsystems.co.uk
In reply to: Ang Tun Chek (#1)
Re: some questions

On Wed, 15 May 2002, Ang Tun Chek wrote:

hi
i am new to postresql and i need some help for some sql command

what is the sql command in postresql equal to "describe table"?

what is the sql command to list all tables in the database?

Well the second of these is:

SELECT relname FROM pg_class

However, I don't think that's really what you mean. I would suggest that you
what you want to do is connect to your database with psql. Do a \? at the
prompt and take a look at the \d commands. For example \dt will list
tables. Starting psql with the -E switch will show you the queries it
generates to do things like list the tables.

Good luck,

--
Nigel J. Andrews
Director

---
Logictree Systems Limited
Computer Consultants

#3Dorward Villaruz
dorwardv@ntsp.nec.co.jp
In reply to: Ang Tun Chek (#1)
Re: some questions

try
#\d tablename, i hope this is what you mean
----- Original Message -----
From: "Ang Tun Chek" <atchek@eware.com.my>
To: <pgsql-general@postgresql.org>
Sent: Tuesday, May 14, 2002 9:49 PM
Subject: [GENERAL] some questions

Show quoted text

hi
i am new to postresql and i need some help for some sql command

what is the sql command in postresql equal to "describe table"?

what is the sql command to list all tables in the database?

thank you

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org