SQL 的 or注意事项 要正确使用括号

select c_gcode,c_barcode,c_name,c_price_disc,c_price,c_status  from  tb_gds  where ( c_price like '%._[1,2,3,4,5,6,7,8,9]%'  or c_price_disc like '%._[1,2,3,4,5,6,7,8,9]%' )and c_weigh='否' and  c_status='正常流转' order by c_price_disc desc



select c_gcode,c_barcode,c_name,c_price_disc,c_price,c_status  from  tb_gds  where c_price like '%._[1,2,3,4,5,6,7,8,9]%'  or c_price_disc like '%._[1,2,3,4,5,6,7,8,9]%' and c_weigh='否' and  c_status='正常流转' order by c_price_disc desc
 
结果肯定是不一样的。QQ截图20121212094600 
posted @ 2012-12-12 09:45  忙碌在路上  阅读(2216)  评论(0编辑  收藏  举报