query help - Mailing list pgsql-general

From G.L. Grobe
Subject query help
Date
Msg-id 000d01c131ad$d4b9e3a0$0200a8c0@trinity
Whole thread Raw
Responses Re: query help
List 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




pgsql-general by date:

Previous
From: "Andrew Snow"
Date:
Subject: Re: Re: quick question: index optimisations on small tables
Next
From: Stephan Szabo
Date:
Subject: Re: Re: quick question: index optimisations on small tables