Why not just use a union ?
select userID,NULL as clientID from user where userCodeDrivingLicense =
'321321321' union select NULL as userID,clientID from client where
clientCodeDrivingLicense = '321321321';
2011/5/6 Rocio Gomez Escribano <r.gomez@stripped>
> Tables "client" an "user" are quite similar, but they don't have any
> intersection, I mean, if somebody is a client, he or she cant be a user.
> I have his or her driving license and I need to know what kind of person
> Im trying some join left, right, but I'm unable to get it!!
> Rocío Gómez Escribano
> Polígono Campollano C/F, nº21T
> 02007 Albacete (España)
> Tlf:967-504-513 Fax: 967-504-513
> -----Mensaje original-----
> De: Halász Sándor [mailto:hsv@stripped]
> Enviado el: miércoles, 04 de mayo de 2011 22:43
> Para: Rocio Gomez Escribano
> CC: mysql@stripped
> Asunto: Re: RV: independent tables
> >>>> 2011/05/04 16:57 +0200, Rocio Gomez Escribano >>>>
> I suppose my solution is an Join, but they have no intersection
> Your examples are very much like a simple join, a special case of
> ... client OUTER JOIN user ON clientCodeDrivingLicense =
> What is wrong with that? (although actually MySQL does not do full outer
> joining. It is needful to get that through a union of left join and right
> join, care taken that the inner join in only one of them appear.)
> Actually, your tables "client" and "user" look like the same table with
> field names changed, no other difference. Field names have nothing to do
> with intersection.
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: http://lists.mysql.com/mysql?unsub=1
Distributed Computing stats