MySQL database string functions of the left, right usage

grammar
LEFT(str,len)
Returns the leftmost len characters from the string str, or NULL if any argument is NULL.
Returned from the leftmost string str len characters, if either parameter is null null is returned.

RIGHT (str, len)
Returns the rightmost len characters from the string str, or NULL if any argument is NULL.
Returned from the rightmost string str len characters, if either parameter is null null is returned
 
Examples

 

Guess you like

Origin www.cnblogs.com/bkyqtr/p/11414390.html