Hi,

I have the following tables in mysql:

mysql> select * from a;
+------+
| col1 |
+------+
|    1 |
|    2 |
|    3 |
+------+
3 rows in set (0.00 sec)

mysql> select * from b;
+------+------+
| col1 | col2 |
+------+------+
|    2 | b    |
|    3 | c    |
+------+------+
2 rows in set (0.00 sec)

mysql> select * from c;
+------+
| col1 |
+------+
|    2 |
+------+
1 row in set (0.00 sec)


When I perform the following select statement, I got
this result:

mysql> select * from a left join (b inner join c on
b.col1 = c.col1) on 
mysql> a.col1 = b.col1;
+------+------+------+------+
| col1 | col1 | col2 | col1 |
+------+------+------+------+
|    1 |    2 | b    | NULL |
|    2 |    2 | b    |    2 |
|    3 |    2 | b    | NULL |
|    1 |    3 | c    | NULL |
|    2 |    3 | c    | NULL |
|    3 |    3 | c    | NULL |
+------+------+------+------+
6 rows in set (0.04 sec)


I tried it in both 4.0.X and 4.1.X and it gave me the
same result which was not what I expected.

I am expecting to have the following result which is
what Oracle and SQLServer return:

col1        col1        col2 col1        
----------- ----------- ---- ----------- 
1           NULL        NULL NULL
2           2           b    2
3           NULL        NULL NULL


Does MySQL follows ANSI standard in handling outer
joins and inner joins?

Is this a bug?

Thanks.

Maggie :)



                
__________________________________ 
Do you Yahoo!? 
Check out the new Yahoo! Front Page. 
www.yahoo.com 
 


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to