oracle 截取字段长度substr

--查询一个字段

select c.othflag from prpcmain c where rownum=1;   --010000YY000000002000

--取该字段的第一个数字

select distinct substr(c.OthFlag,1,1) as newflag from prpcmain c where rownum=1;   --0

posted @ 2018-07-30 12:10  wuyueping  阅读(1251)  评论(0编辑  收藏  举报