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

猜你喜欢

转载自www.cnblogs.com/wuyuwuyueping/p/9389913.html