* vinita vigine Murugiah
>     I'm using ver 3:23:49 & 3:23:53, I thought
> "A LEFT JOIN B USING (c)" is Identical to "A LEFT JOIN B ON A.c =  B.c"

I think it is...

> It seems it is NOT the case if you are joining more that ONE table & one
> of them is EMPTY. Please see the following Example
[... excelent examples snipped for bandwith preservation...]
> mysql> select * from room LEFT JOIN roomLock USING (roomNum)  LEFT JOIN
> roomOwner USING (roomNum)
[...]
> I would expect the same result if I Left join the roomOwner followed by
> roomNum, BUT IT IS NOT
> Is it a bug?? or my expectation is wrong??

It's your expectations... notice that the roomOwner.roomNum column is NULL.
USING relates to the immediately preceding table.

[...]
> mysql> select * from room LEFT JOIN roomOwner ON room.roomNum =
> roomOwner.roomNum
>     -> LEFT JOIN roomLock  ON room.roomNum = roomLock.roomNum;

This is not the same... instead of "LEFT JOIN roomLock ON room.roomNum =
roomLock.roomNum" you would have to use "LEFT JOIN roomLock ON
roomOwner.roomNum = roomLock.roomNum" to get the same behaviour as with
USING(roomNum).

--
Roger


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to