> Hi
> I'm trying to extract data from 2 tables (A and B) with a subquery
> 
> A has the fields (ID_person, name)
> B has the fields (ID_person,ID_country)
> 
> This is my query
> 
> select *
> from A
> where A.id_person IN (select B.id from B where B.ID_country =7)
> 
Subqueries are not supported in mysql yet.
Try this:
select A.* from A,B where A.id_person=B.id_person and ID_country=7


-- 
_/        _/  _/_/_/  -----     Rafał Jank [EMAIL PROTECTED]     -----
 _/  _/  _/  _/   _/         Wirtualna Polska SA   http://www.wp.pl 
  _/_/_/_/  _/_/_/    ul. Traugutta 115c, 80-237 Gdansk, tel/fax. (58)5215625
   _/  _/  _/         --------==*  http://szukaj.wp.pl *==----------

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to