我想把查询结果:
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;
就可以得到我想的结果,我想合成一条语句写应该怎么写啊?
谢谢
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;
就可以得到我想的结果,我想合成一条语句写应该怎么写啊?
谢谢
把 and 改为 or
delete from tablename where bur_id=120606 and cust_type!=6 or bur_type!=12;