首页 > 技术文章 > instr

wangchuanfu 2019-01-11 15:00 原文

MySQL: select * from tableName where name like '%helloworld%';
Oracle:select * from tableName where instr(name,'helloworld')>0;
select BLACK_VALUE, COUNT(*)as total
         from EC_COUPONS_BLACK
         where IS_DELETE='N'

 AND   BLACK_TYPE='goods'
           and IS_ALL_COUPONS='Y'
       and   instr(','||BLACK_VALUE||',',','||(select goods_id from goods where goods_no = '133163'and is_delete = 'N')||',') >0
 GROUP BY BLACK_VALUE

 

推荐阅读