From: | "Darrin Ladd" <dladd(at)newfoundcomm(dot)net> |
---|---|
To: | "Stuart Foster" <stuartafoster(at)home(dot)com>, "G(dot) Anthony Reina" <reina(at)nsi(dot)edu>, <pgsql-sql(at)postgreSQL(dot)org> |
Subject: | Re: How can I select all of the tables with field name 'area'? |
Date: | 2000-09-12 01:15:31 |
Message-ID: | 015e01c01c56$f24be840$0e040a0a@dirge.NEWFOUND |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Here's what you are looking for:
SELECT pg_class.relname
FROM pg_class, pg_attribute
WHERE pg_attribute.attname = 'area'
AND pg_attribute.attrelid = pg_class.oid;
This should give you all of the classes (tables) which have the attribute
(field) 'area'.
Cheers,
Darrin
-----Original Message-----
From: Stuart Foster <stuartafoster(at)home(dot)com>
To: G. Anthony Reina <reina(at)nsi(dot)edu>; pgsql-sql(at)postgreSQL(dot)org
<pgsql-sql(at)postgreSQL(dot)org>
Date: Monday, September 11, 2000 7:03 PM
Subject: RE: [SQL] How can I select all of the tables with field name
'area'?
>You should be able to query the system table that holds that column names.
>Not sure which it is tho.
>
>-----Original Message-----
>From: pgsql-sql-owner(at)hub(dot)org [mailto:pgsql-sql-owner(at)hub(dot)org]On Behalf
>Of G. Anthony Reina
>Sent: Monday, September 11, 2000 4:38 PM
>To: pgsql-sql(at)postgreSQL(dot)org
>Subject: [SQL] How can I select all of the tables with field name
>'area'?
>
>
>I have a database with several tables. I'd like to pull out a list of
>names for the tables that contain the field (class) name 'area'.
>
>Can this be done?
>
>-Tony
>
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Max Pyziur | 2000-09-12 03:03:26 | Re: [SQL] Re: [BUGS] "ORDER BY" issue - is this a bug? |
Previous Message | Hector Banda | 2000-09-12 00:53:38 | This is A test Please Delete |