nested sql statment using and

Posted by klay on Stack Overflow See other posts from Stack Overflow or by klay
Published on 2010-04-28T06:24:14Z Indexed on 2010/04/28 6:33 UTC
Read the original article Hit count: 401

Filed under:
|
|

hi guys, how to make this work in mysql?

select ID,COMPANY_NAME,contact1, SUBURB, CATEGORY, PHONE from Victoria where (city in ( select suburb from allsuburbs)) and CATEGORY='Banks'

this below statement is working: select ID,COMPANY_NAME,contact1, SUBURB, CATEGORY, PHONE from Victoria where city in ( select suburb from allsuburbs)

if I add "and" , it gives me an empty resultset, thanks

© Stack Overflow or respective owner

Related posts about mysql-query

Related posts about nested