我想查找item_code中不在609901%(模糊查询)、609902%、609903%中的其他所有item_code 怎么找!

解决方案 »

  1.   

    select xxx
    from xxx
    not in(609901%,609902%,609903%);
      

  2.   

    select * from tab
    where left(item_code,6) not in ('609901','609902','609903')
      

  3.   

    怎么都喜歡到java板塊來問sql的問題啊?
    難道sql板塊太可怕了?
      

  4.   

    select item_code  from 表1 where item_code not in (select item_code from 表1 where item_code like '609901%' or item_code like '609902%' or item_code like '609903%')
      

  5.   

    是这样的,我用的是PL/SQL,刚才都试了一遍,都不行啊!
      

  6.   

    我用下面这段代码:
    select * from drp_item t where t.item_code not like '609901%--609903%'
    结果还是有'609903'开头的
    哪位兄弟帮忙解决呀