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

Re: Easiest way to extract owner-id from a third table

From: Rikard Bosnjakovic <rikard(dot)bosnjakovic(at)gmail(dot)com>
To: Thom Brown <thom(at)linux(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Easiest way to extract owner-id from a third table
Date: 2010-08-20 16:05:49
Message-ID: AANLkTikrRbABxiT9+fCzfVjT0aG1VSqA6nezMqRkZeJt@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-novice
On Thu, Aug 19, 2010 at 19:46, Thom Brown <thom(at)linux(dot)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

In response to

pgsql-novice by date

Next:From: Chip SteeleDate: 2010-08-20 20:15:32
Subject: Streaming Replication in PostgreSQL9.0 b4: Standby dropping connections
Previous:From: Mladen GogalaDate: 2010-08-19 18:23:26
Subject: Re: Queries running the longest?

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