Re: Limit # of recs on inner join?

From: Rodrigo E(dot) De León Plicet <rdeleonp(at)gmail(dot)com>
To: Josh <josh(at)globalherald(dot)net>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Limit # of recs on inner join?
Date: 2008-01-01 02:07:05
Message-ID: a55915760712311807l716a77e8l86873515f0ca1f9@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Dec 31, 2007 1:52 PM, Josh <josh(at)globalherald(dot)net> wrote:
> Instead, I just want:
>
> 1 A Cat In The Hat Dr. Seuss

SELECT books.book_id, books.title,
(SELECT author_name
FROM authors
WHERE book_id = books.book_id
LIMIT 1) AS author_name
FROM books
WHERE books.book_id = ?

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Richard Broersma Jr 2008-01-01 05:25:19 Re: Limit # of recs on inner join?
Previous Message Josh 2007-12-31 18:52:03 Limit # of recs on inner join?