Search Postgresql Archives

Re: Simple OUTER JOIN doubt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sandro Dentella <sandro@xxxxxxxx> writes:
> I only get films for which a vote was expressed. My query:

>        SELECT f.id, f.titolo, p.voto
>        FROM film_film f
>        LEFT OUTER JOIN vota_punteggio  p
>        ON (f.id = p.film_id)
>        WHERE
>        (p.user_id = 2 OR p.user_id IS NULL)

> Can you help me understanding what is wrong? 

[ scratches head... ]  Looks all right to me.  Are you sure you copied
what you typed accurately?  Does EXPLAIN show that a left join is being
used?

			regards, tom lane


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux