Last Updated: February 25, 2016
·
27.67K
· milesmatthias

sqlite substring from right

substr( string, Y, Z)

Z is how many characters you want to print since Y. Y where to start printing from the left.

To get the last 6 characters of User.id:

substr(User.id, -6)

http://www.sqlite.org/lang_corefunc.html