LEFT JOIN get more than FULL JOIN?

This is a discussion on LEFT JOIN get more than FULL JOIN? within the MySQL Database forums, part of the Database Forums category; Hi there, I have two tables (probe and dbxref): [probe] id value [dbxref] probe_id db_id I imagine that a query ...


Go Back   Usenet Forums > Database Forums > MySQL Database

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-29-2007
yorklee70@gmail.com
 
Posts: n/a
Default LEFT JOIN get more than FULL JOIN?

Hi there,

I have two tables (probe and dbxref):

[probe]
id value

[dbxref]
probe_id db_id

I imagine that a query using FULL JOIN should always get lines no less
than a query using LEFT JOIN , but the result frustrated me:

mysql> SELECT count(id) FROM probe FULL JOIN dbxref ON id=probe_id;
+-----------+
| count(id) |
+-----------+
| 96552 |
+-----------+
1 row in set (0.27 sec)

mysql>
mysql> SELECT count(id) FROM probe LEFT JOIN dbxref ON id=probe_id;
+-----------+
| count(id) |
+-----------+
| 101601 |
+-----------+
1 row in set (1.12 sec)

Anybody can explain why this happened?

Thanks very much,

York

Reply With Quote
  #2 (permalink)  
Old 05-30-2007
Peet
 
Posts: n/a
Default Re: LEFT JOIN get more than FULL JOIN?

Hi there,

You might find this interesting: http://bugs.mysql.com/bug.php?id=15457

It says that "full join" or "full outer join" is not (yet officially)
implemented in MySQL, so you are using an undocumented feature (or a
buggy implementation of full outer join)

If you google on "MySQL FULL JOIN", you'll find some workarounds.

Have fun.

Peet

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 03:12 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0