网站首页  汉语字词  英语词汇  考试资料  写作素材  旧版资料

请输入您要查询的考试资料:

 

标题 oracle查询不含括号及不含指定字符的方法
内容
    这篇文章主要介绍了oracle查询不含括号及不含指定字符的方法,需要的朋友可以参考下。
    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
    结果为:
    其中regexp_instr为oracle支持的正则表达式函数,其功能与instr相似。此处匹配了含有括号()和()的记录。
随便看

 

在线学习网考试资料包含高考、自考、专升本考试、人事考试、公务员考试、大学生村官考试、特岗教师招聘考试、事业单位招聘考试、企业人才招聘、银行招聘、教师招聘、农村信用社招聘、各类资格证书考试等各类考试资料。

 

Copyright © 2002-2024 cuapp.net All Rights Reserved
更新时间:2025/5/16 0:44:39