zoukankan      html  css  js  c++  java
  • oracle--数据筛选

    一:当统一社会信用代码或者工商注册号两个字段中,有的时候只有一个字段含有数据,但是所取的值必须要拥有字段,这个时候,语句为下:

    select t.entname,
           case
             when t.uniscid is null then
              t.regno
             else
              t.uniscid
           end as 编码或注册号,
    
      from REG_MarPriPInfo t
    
    
    
    case when 当该字段为空的时候 then 取另外一个字段 else 取当前字段 end

    二:筛选某个字段中不带中文的所有数据

    select * from table where regexp_substr(check,'[0-9]+') is not null   
    可以筛选出不带中文
    
    select * from 表名where regexp_substr(所选字段,'[0-9]+') is not null  
  • 相关阅读:
    awk
    tac
    cat
    less
    more
    head
    vim
    linux安装redis
    Redis for Python开发手册
    Python3.x标准模块库目录
  • 原文地址:https://www.cnblogs.com/jianshuai520/p/9956428.html
Copyright © 2011-2022 走看看