Re: sql join question - Mailing list pgsql-general

From Ragnar Hafstað
Subject Re: sql join question
Date
Msg-id 1109716096.16688.86.camel@localhost.localdomain
Whole thread Raw
In response to sql join question  (Scott Frankel <leknarf@pacbell.net>)
Responses Re: sql join question
List pgsql-general
On Tue, 2005-03-01 at 13:42 -0800, Scott Frankel wrote:

> [snip problem]

> Task:  find all color names in each of palette1's tones.
>
> Can this be done in a single SQL statement?

> [snip table examples]

looks like a job for NATURAL JOIN

test=# select color_name
       from palettes
            natural join tones
            natural join colors
       where palette_name='plt1';

   color_name
----------------
 rose madder
 crimson
 red ochre
 phthalocyanine
 leaf green
(5 rows)


gnari



pgsql-general by date:

Previous
From: CSN
Date:
Subject: Trigger email?
Next
From: Chris Kratz
Date:
Subject: Re: Novice Question