Mailing List
Home
Forum Home
MySQL General - General MySQL discussion
MySQL++ - Programming with the C++ API to MySQL
MaxDB - Everything about MaxDB, formerly known as SAP DB
ODBC - ODBC with the MySQL Connector/ODBC driver
MySQL on Win32 - Runing MySQL on Windows 9x/Me/NT/2000/XP
Java Help - Mostly related to the MySQL Connector/J driver
Perl - Perl support for MySQL with DBI and DBD::mysql
GUI - MySQL GUI Tools
Announcement
Subjects
Subject: mysql openssl Question
ERROR 1045: Access denied for user: 'root@localhost ' (Using
password: NO)
Update one field with more fields from another table
Subject: Getting Identity after INSERT
ERROR 2002: Can 't connect to local MySQL server through socket
mysql test 4 1 fails with the gis test
Subject: MySQL Cluster Software
Downgrade Mysql from 4 to 3 23
Mysql 4 0 Oracle Stored Procedure Trigger Conversion
Can 't access mysql after kernel upgrade
Executing MySQL Commands From Within C Program
Comparing and writing out BLOBS
Subject: Re: Preventing Duplicate Entries
FULLTEXT query format question
Strange behavior, Table Level Permission
Does the binary log enabling affect the MySQL performances?
mysql:it 's a db not a dbms how it 's possible?!
mysql have same function mthod as Oracle decode()
 
Order in left join

Order in left join

2007-08-01       - By Lukasz Misztal

 Back
Reply:     1     2     3     4     5  

Hello everyone,

i have a simple question:
is order of fields in (left) join in MAXDB significant?

For example:

select * from "Table1"
left join "Table2" on "Table1_ID"="Table2_IDTable1"

Returns:
10   21   10  
11   ?   ?  

but

select * from "Table1"
left join "Table2" on "Table2_IDTable1"="Table1_ID"

Returns:
?   20   ?  
10   21   10

I get confused.
Two diffrent strategies (JOIN VIA KEY RANGE/JOIN VIA KEY COLUMN).

I have searched bugs.mysql.com but it gets nothing.
Is it bug whether my basic mistake?

Lukasz

-- ---- ---- ---- ---
MAXDB 7.6.00.37 WinXp prof., test data:

CREATE TABLE "Table1"
(
  "Table1_ID"  Fixed (12,0),
  PRIMARY KEY ("Table1_ID")
)
//
CREATE TABLE "Table2"
(
  "Table2_ID"  Fixed (12,0),
  "Table2_IDTable1"  Fixed (12,0),
  PRIMARY KEY ("Table2_ID")
)
//
insert into "Table1" values (10)
//
insert into "Table1" values (11)
//
insert into "Table2" values (20,null)
//
insert into "Table2" values (21,10)
//
select * from "Table1"
left join "Table2" on "Table2_IDTable1"="Table1_ID"
//
select * from "Table1"
left join "Table2" on "Table1_ID"="Table2_IDTable1"


--
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe:    http://lists.mysql.com/maxdb?unsub=mysql@(protected)