Re: join with 1 row limit

From: Vibhor Kumar <vibhor(dot)kumar(at)enterprisedb(dot)com>
To: Behringer Behringer <behringerdj(at)yahoo(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: join with 1 row limit
Date: 2011-01-15 11:45:50
Message-ID: 08CE3496-0C78-4F1D-B51F-B5A22790D696@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Try:

SELECT * FROM products p LEFT JOIN products_images pi ON p.id = pi.product_id WHERE products.company = 7 LIMIT 1;

On Jan 15, 2011, at 8:02 AM, Behringer Behringer wrote:

> SELECT *
> FROM
> products p LEFT JOIN
> products_images pi ON p.id = pi.product_id LIMIT 1
> WHERE products.company = 7

Thanks & Regards,
Vibhor Kumar

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message YAMAMOTO Takashi 2011-01-15 13:17:53 Re: async fast-path calls?
Previous Message Behringer Behringer 2011-01-15 02:32:14 join with 1 row limit