Received: from C654771-a.frmt1.sfba.home.com (c654771-a.frmt1.sfba.home.com [24.176.200.175]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id eBJ8CT665204 for ; Tue, 19 Dec 2000 03:12:29 -0500 (EST) (envelope-from kumar1@C654771-a.frmt1.sfba.home.com) Received: (from kumar1@localhost) by C654771-a.frmt1.sfba.home.com (8.9.3/8.9.3) id AAA03227; Tue, 19 Dec 2000 00:12:33 -0800 To: pgsql-sql@postgresql.org Subject: Re: question on SELECT References: <75AEDF97D677D411B8D300D0B746D3E0074543@wolf.mastec.com.sg> From: kumar1@home.com (Prasanth A. Kumar) Date: 19 Dec 2000 00:12:33 -0800 In-Reply-To: Howard Hiew's message of "Tue, 19 Dec 2000 13:52:12 +0800" Message-ID: Lines: 24 X-Mailer: Gnus v5.7/Emacs 20.7 X-Archive-Number: 200012/208 X-Sequence-Number: 542 Howard Hiew writes: > Hi, > I would like to know what is the sql statement that list all the tables > name. > > For example in Oracle, > 'SELECT TABLE_NAME from ALL_TABLES where owner="Oracle" '; > > What is the statement for Postgres? > Thank you > > Best Regards, > Howard > CIM/MASTEC > Tel:(65)8605283 You can do '\dt' to list all tables. There is also a system table 'pg_tables' which you can use if you like to do a select instead. Do SELECT tablename FROM pg_tables where tableowner='postgres'; -- Prasanth Kumar kumar1@home.com