11.3.10 RIGHT(str,x)函数
RIGHT(str,x)函数返回字符串str最右边的x个字符组成的字符串,如果x的值为NULL,则返回NULL。使用示例如下:
mysql> SELECT RIGHT('hello world', 5), RIGHT('hello world', NULL);
+-------------------------+----------------------------+
| RIGHT('hello world', 5) | RIGHT('hello world', NULL) |
+-------------------------+----------------------------+
| world | NULL |
+-------------------------+----------------------------+
1 row in set (0.00 sec)