MySQL數據庫中字符串函數之left、right用法


語法
LEFT(str,len)
Returns the leftmost len characters from the string str, or NULL if any argument is NULL.
返回從字符串str最左邊的len個字符,如果任一參數為null則返回null。

RIGHT(str,len)
Returns the rightmost len characters from the string str, or NULL if any argument is NULL.
返回從字符串str最右邊的len個字符,如果任一參數為null則返回null
 
實例

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM