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
 
实例

猜你喜欢

转载自www.cnblogs.com/bkyqtr/p/11414390.html