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