Re: Easiest way to extract owner-id from a third table - Mailing list pgsql-novice

From Rikard Bosnjakovic
Subject Re: Easiest way to extract owner-id from a third table
Date
Msg-id AANLkTikrRbABxiT9+fCzfVjT0aG1VSqA6nezMqRkZeJt@mail.gmail.com
Whole thread Raw
In response to Re: Easiest way to extract owner-id from a third table  (Thom Brown <thom@linux.com>)
List pgsql-novice
On Thu, Aug 19, 2010 at 19:46, Thom Brown <thom@linux.com> wrote:

> Try this:
>
> SELECT components.owner_id
> FROM components
> INNER JOIN component_images ON components.id = component_images.components_id
> WHERE component_images.images_id = %
> LIMIT 1

Magic!

Thank you.


--
- Rikard

pgsql-novice by date:

Previous
From: Mladen Gogala
Date:
Subject: Re: Queries running the longest?
Next
From: Chip Steele
Date:
Subject: Streaming Replication in PostgreSQL9.0 b4: Standby dropping connections