SQL subquery to supply table name?

From: Scott Chapman <scott_list(at)mischko(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: SQL subquery to supply table name?
Date: 2002-09-26 23:04:14
Message-ID: 200209261604.14153.scott_list@mischko.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have a situation where a table contains table names. I need to know if I
can make a Postgresql query that will have a subquery which supplies the
table name I want to deal with. Can this be done?

Something like this:
select column from (select table_name from table2 where key=value) where
key=value;

Scott

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Doug McNaught 2002-09-26 23:26:03 Re: [HACKERS] Performance while loading data and indexing
Previous Message Bruce Momjian 2002-09-26 22:04:52 Re: [HACKERS] Performance while loading data and indexing