Getting last 5 char of string with mysql query

0
343

You can do this with RIGHT(str,len) function. Returns the rightmost len characters from the string str,

Like below:

SELECT RIGHT(columnname,5) as yourvalue FROM tablename

LEAVE A REPLY

Please enter your comment!
Please enter your name here