Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • RIGHT(str,len) mysql function

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 247
    Comment on it

    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)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: