Re: join with 1 row limit

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
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 15:49:09
Message-ID: 28617.1295106549@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Behringer Behringer <behringerdj(at)yahoo(dot)com> writes:
> In mysql this query works fine, what is the equivalent in posgresql?
> SELECT *
> FROM
> products p LEFT JOIN
> products_images pi ON p.id = pi.product_id LIMIT 1
> WHERE products.company = 7

When asking that sort of question, it would be a good idea to explain
exactly what you expect that syntax to do. Not all of us know every
nook and cranny of mysql's nonstandard behaviors.

regards, tom lane

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Behringer Behringer 2011-01-15 18:37:54 Re: join with 1 row limit
Previous Message Frank Bax 2011-01-15 13:19:25 Re: join with 1 row limit