1 (手機號顯示前兩位后三位中間用*表示)
set mobile_no =(case when mobile_no is not null then substr(mobile_no,1,2)||'******'||substr(mobile_no,9) else null end)
2(身份證隱藏年月日)
set CERTIFICATE_CODE=(case when CERTIFICATE_CODE is not null then substr(CERTIFICATE_CODE,1,6)||'********'||substr(CERTIFICATE_CODE,15) else null end )
3(銀行卡顯示后四位)
set REPAY_ACCOUNT_NO=(case when REPAY_ACCOUNT_NO is not null then '************'||substr(REPAY_ACCOUNT_NO,13) else null end)
substr('abcdf',1,3)=adb 從1開始計數,截取3為
substr('abcdef',2,3)=bcd 從第二位開始包含第二位,截取三位。
substr('abcdef',5)=ef 從第五位開始包含第五名,截取到最后。