admin

Oracle sql 子字符串长度判断

admin apache 2023-02-26 620浏览 0

Oracle sql 子字符串长度判断

 

select t.* from   d_table t 
WHERE  substr(t.col,1,1)='8'   and instr(t.col,'/')>0 
and length(substr(t.col,1,instr(t.col,'/')))>5;

 字符串的前两位都是数字:

select * from   d_table t 
WHERE regexp_like(substr(t.col,1,2), '^[[:digit:]]+$') and length(t.col) > 7 ;

 

继续浏览有关 数据库技术文章/教程 的文章
发表评论