MySQL Forums
Forum List  »  MyISAM

Re: SQL problem
Posted by: koofmich
Date: September 02, 2006 03:13AM

How many rows would you expect from a query like

SELECT pl.id AS plid, pl.name AS plname,
IFNULL(an.id, 0) AS anid
FROM pl LEFT OUTER JOIN an
ON pl.id = an.plid
WHERE an.id = 1

supposing pl has 3 records and an has 100 records and only 1 record matching the WHERE condition fullfills the ON condition. According to your statement above (and according to standard SQL) 3 rows would be expectable.

MySQL (5.0.18) returns 1 - GREAT! Or stupid?

Options: ReplyQuote


Subject
Views
Written By
Posted
2883
September 01, 2006 11:26AM
1509
September 01, 2006 11:49AM
Re: SQL problem
1560
September 02, 2006 03:13AM
1706
October 04, 2006 11:49AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.