日期:2014-05-18  浏览次数:20465 次

一个比较低级的Select查询问题
表bill : 
  id billtype Othtype  
  1 A 0
  2 A 1
  3 B 0
  4 C 0
   
select 查询表bill时如何排除billtype为C的记录,和billtype为A同时Othtype为1的记录;

select查询后应得到下表
   
  id billtype othtype
  1 A 0
  3 B 0 

请高手指教

------解决方案--------------------
探讨
select * From bill where billtype = 'C' or (billtype = 'A' and Othtype = 1)