Lists: | pgsql-sql |
---|
From: | Howard Hiew <howard(at)cim(dot)mastec(dot)com(dot)sg> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | question on SELECT |
Date: | 2000-12-19 05:52:12 |
Message-ID: | 75AEDF97D677D411B8D300D0B746D3E0074543@wolf.mastec.com.sg |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-sql |
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
From: | kumar1(at)home(dot)com (Prasanth A(dot) Kumar) |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: question on SELECT |
Date: | 2000-12-19 08:12:33 |
Message-ID: | m38zpcde32.fsf@C654771-a.frmt1.sfba.home.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-sql |
Howard Hiew <howard(at)cim(dot)mastec(dot)com(dot)sg> 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(at)home(dot)com
From: | Jie Liang <jliang(at)jliang(dot)ipinc(dot)com> |
---|---|
To: | "Prasanth A(dot) Kumar" <kumar1(at)home(dot)com> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: question on SELECT |
Date: | 2000-12-19 17:25:17 |
Message-ID: | Pine.BSF.4.21.0012190924100.41305-100000@jliang.ipinc.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-sql |
use:
\dt -- all tables
\dv -- all views
\df -- all functions
...
Jie LIANG
Internet Products Inc.
10350 Science Center Drive
Suite 100, San Diego, CA 92121
Office:(858)320-4873
jliang(at)ipinc(dot)com
www.ipinc.com
On 19 Dec 2000, Prasanth A. Kumar wrote:
> Howard Hiew <howard(at)cim(dot)mastec(dot)com(dot)sg> 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(at)home(dot)com
>