RIGHT(str,len)
In mysql, if you want some character from the right in a string then you can use RIGHT() mysql function means this function returns the rightmost len characters from the string str or returns NULL if any argument is NULL.
Here are some example which will explain the RIGHT function-
mysql> SELECT RIGHT('Hello MySQL',4);
+------------------------+
| RIGHT('Hello MySQL',4) |
+------------------------+
| ySQL |
+------------------------+
1 row in set (0.00 sec)
mysql> SELECT RIGHT('Hello MySQL',11);
+-------------------------+
| RIGHT('Hello MySQL',11) |
+-------------------------+
| Hello MySQL |
+-------------------------+
1 row in set (0.00 sec)
mysql> SELECT RIGHT('Hello MySQL',7);
+------------------------+
| RIGHT('Hello MySQL',7) |
+------------------------+
| o MySQL |
+------------------------+
1 row in set (0.00 sec)
0 Comment(s)