Received: from mail.vitts.com (mail.vitts.com [216.64.31.74]) by hub.org (8.10.1/8.10.1) with ESMTP id e8C0EUf21272 for ; Mon, 11 Sep 2000 20:14:30 -0400 (EDT) Received: from dirge ([64.31.64.155]) by mail.vitts.com (InterMail vK.4.02.00.10 201-232-116-110 license 41b9a04052e49f5915685470d4b52094) with SMTP id <20000912001429.LQYB583.mail.vitts.com@dirge>; Mon, 11 Sep 2000 20:14:29 -0400 Message-ID: <015e01c01c56$f24be840$0e040a0a@dirge.NEWFOUND> From: "Darrin Ladd" To: "Stuart Foster" , "G. Anthony Reina" , Subject: Re: How can I select all of the tables with field name 'area'? Date: Mon, 11 Sep 2000 20:15:31 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.72.3612.1700 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3612.1700 X-Archive-Number: 200009/72 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 To: G. Anthony Reina ; pgsql-sql@postgreSQL.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@hub.org [mailto:pgsql-sql-owner@hub.org]On Behalf >Of G. Anthony Reina >Sent: Monday, September 11, 2000 4:38 PM >To: pgsql-sql@postgreSQL.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 > > >