oracle全角转半角

  SELECT To_single_byte('00852-95231159') FROM dual ---转成半角
SELECT To_muil_byte('88189871') FROM dual-----转成全角
length(p1.accounts)!=lengthb(p1.accounts)----此条件是查出哪些记录里含有全角字符
 
SELECT '12345',
        DUMP('12345'),
        TO_SINGLE_BYTE('12345'),
        DUMP(TO_SINGLE_BYTE('12345'))
FROM dual;

 

你可能感兴趣的:(oracle,sql)