Re: [SQL] LEFT OUTER JOIN question

2008-05-04 Thread Frank Bax
Craig Ringer wrote: > seiliki wrote: >> I expect the SELECT to return two rows. Would some kind >> soul explain for me why it gives only one row? > > Without having read the post in detail I'll make a guess: Because NULL = > NULL results in NULL, not true, and the outer (or any other) join > cond

Re: [SQL] LEFT OUTER JOIN question

2008-05-04 Thread Aaron Bono
On Sun, May 4, 2008 at 11:28 AM, seiliki <[EMAIL PROTECTED]> wrote: > Hi! > > I expect the SELECT to return two rows. Would some kind > soul explain for me why it gives only one row? > > TIA > > CN > = > CREATE TABLE x(c1 text,c2 int2); > INSERT INTO x VALUES('a',10); > INSERT INTO x V

Re: [SQL] LEFT OUTER JOIN question

2008-05-04 Thread Craig Ringer
seiliki wrote: > Hi! > > I expect the SELECT to return two rows. Would some kind > soul explain for me why it gives only one row? Without having read the post in detail I'll make a guess: Because NULL = NULL results in NULL, not true, and the outer (or any other) join condition only accepts rows

[SQL] LEFT OUTER JOIN question

2008-05-04 Thread seiliki
Hi! I expect the SELECT to return two rows. Would some kind soul explain for me why it gives only one row? TIA CN = CREATE TABLE x(c1 text,c2 int2); INSERT INTO x VALUES('a',10); INSERT INTO x VALUES('b',NULL); CREATE TABLE y(c1 int2,c2 int2,c3 text); INSERT INTO y VALUES(10,9,'yyy