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.
> So,
> I have his or her driving license and I need to know what kind of person
> is.
>
> Im trying some join left, right, but I'm unable to get it!!
>
> Rocío Gómez Escribano
> r.gomez@stripped
>
>
> Polígono Campollano C/F, nº21T
> 02007 Albacete (España)
> Tlf:967-504-513 Fax: 967-504-513
> www.ingenia-soluciones.com
>
> -----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
> <<<<<<<<
> Really?
>
> Your examples are very much like a simple join, a special case of
>
> ... client OUTER JOIN user ON clientCodeDrivingLicense =
> userCodeDrivingLicense
>
> 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
http://stats.free-dc.org