日期:2014-05-16  浏览次数:20447 次

急!求個sql語句寫法
select aa,bb,cc from table1 where aa='x' and (bb='xx' or bb='xxx')
那麼上面語句之外記錄的查詢語句應該怎麼寫?有點亂,看得懂吧,請幫忙!
------解决方案--------------------
select aa,bb,cc from table1 where not(aa='x' and (bb='xx' or bb='xxx'))
select aa,bb,cc from table1 where aa!='x' or bb!='xx' and bb!='xxx'