`
53873039oycg
  • 浏览: 824968 次
  • 性别: Icon_minigender_1
社区版块
存档分类
最新评论

[简单]oracle查询不含括号不含指定字符的记录

 
阅读更多
 with tmp_t as(
 select 1 as id,'测试4321_CS' as name from dual union all
 select 2,'测试 1200(测试版)' from dual union all
 select 3,'测试123(测试版)' from dual union all
 select 4,'测试 1212(D2)' from dual union all
 select 5,'测试 1212(D2)测试版' from dual union all
 select 6,'测试 123' from dual)
 select *
   from tmp_t
  where instr(name, '_CS') = 0
    and regexp_instr(name, '(.*)') = 0
    and regexp_instr(name, '\(.*\)') = 0

    结果为:

  

    全文完。    

  • 大小: 4.6 KB
0
1
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics