Skip site navigation (1) Skip section navigation (2)

query help

From: "G(dot)L(dot) Grobe" <gary(at)grobe(dot)net>
To: <pgsql-general(at)postgresql(dot)org>
Subject: query help
Date: 2001-08-30 23:45:20
Message-ID: 000d01c131ad$d4b9e3a0$0200a8c0@trinity (view raw or flat)
Thread:
Lists: pgsql-general
Hi all,

How would I get TableB.label if all I know about is TableA.name?

I was thinking about a query on TableA first, then within the while
(rs.next()), I'd do another query using the result set from A on B, but I
don't like that much, and it seems kind of slow.

Any help much appreciated!

TableA
idA | name | class
-----------------
11    test1   1
12    test2   1
13    test3   2
14    test4   2

TableB
idB | idA | label
----------------
1     11     nameA
2     12     nameB
3     13     nameC
4     14     nameD




Responses

pgsql-general by date

Next:From: Stephan SzaboDate: 2001-08-31 00:08:31
Subject: Re: Re: quick question: index optimisations on small tables
Previous:From: Andrew SnowDate: 2001-08-30 23:26:02
Subject: Re: Re: quick question: index optimisations on small tables

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group