Consider this:
CREATE TABLE "public"."test" (
"id" INTEGER NOT NULL,
"tbl" TEXT
) WITHOUT OIDS;
INSERT INTO "public"."test" ("id", "tbl") VALUES (1, 'status');
INSERT INTO "public"."test" ("id", "tbl") VALUES (2, 'yearplan');
Following two statements will return one record.
select tbl from
Ray Madigan wrote:
> I have never seen this done before, but it seems like it is supposed to work
> from reading the manual.
>
> I want to be able to get a table name from another table and use it in the
> from clause of a select.
>
> Something like
>
> SELECT * FROM (SELECT name FROM bar WHERE
I have never seen this done before, but it seems like it is supposed to work
from reading the manual.
I want to be able to get a table name from another table and use it in the
from clause of a select.
Something like
SELECT * FROM (SELECT name FROM bar WHERE conditions) AS b WHERE b.condition
=