我想把查询结果:
cust_type    bur_type    bur_id
19           12          120606
6            12          120606
6            1           120606
删去bur_type不为12和cust_type不为6的,得到结果:
cust_type    bur_type    bur_id
6            12          120606我用delete from tablename where bur_id=120606 and cust_type!=6 and bur_type!=12;一条记录都删不掉,分开写delete from tablename where bur_id=120606 and cust_type!=6; 
delete from tablename where bur_id=120606 and bur_type!=12;
就可以得到我想的结果,我想合成一条语句写应该怎么写啊?
谢谢

解决方案 »

  1.   

    delete from tablename where bur_id=120606 and cust_type!=6 and bur_type!=12;
    把 and 改为 or 
    delete from tablename where bur_id=120606 and cust_type!=6 or bur_type!=12;
      

  2.   

    delete from tablename where bur_id=120606 and cust_type!=6 and bur_type!=12;第二个 and  改为 or 试试delete from tablename where bur_id=120606 and cust_type!=6 or bur_type!=12;
      

  3.   

    bur_type不为12cust_type不为6这里的用 OR
      

  4.   

    delete from tablename where bur_id=120606 and (cust_type!=6 OR bur_type!=12);