求一SQL语句,在线等大家的帮助!
select   *   from   db   where   mc   like    'x% '   or   mc   like    'y% '   or   mc   like    'z% '   and   rq>  '2007-01-01 ';这样写出来的语句不执行and后面的条件,如何让OR   和AND条件同时执行呢?这语句应该怎么写?
------解决方案--------------------select * from db where (mc like  'x% ' or mc like  'y% ' or mc like  'z% ') and rq>  '2007-01-01 '
------解决方案--------------------  select * from db where mc like  'x% ' or mc like  'y% ' or mc like  'z% ' and rq>  '2007-01-01 '   
 ---------- 
 select * from db where left(mc,1) in ( 'x ', 'y ', 'z ') and rq>  '2007-01-01 '