MySQL数据库中字符串函数之left、right用法

匿名 (未验证) 提交于 2019-12-02 22:06:11
语法
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
 
实例

 

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!