Oracle的substr函數簡單用法,oraclesubstr函數

來源:互聯網
上載者:User

Oracle的substr函數簡單用法,oraclesubstr函數

substr(字串,截取開始位置,截取長度) //返回截取的字串(包含開始位置)

select substr('HelloWorld',0,3) value from dual; --返回結果為 Helselect substr('HelloWorld',1,3) value from dual; --返回結果為 Hel ,0和1都是表示從第一個字元還是截取select substr('HelloWorld',6,5) value from dual; --返回結果為 Worldselect substr('HelloWorld',-3,3) value from dual; --返回結果為 rld 負數(-i)表示截取的開始位置為字串右端向左數第i個字元


 作者:itmyhome


相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.