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

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 (view raw or flat)
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

pgsql-novice by date

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

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