substring - mysql Opposite of SUBSTRING_INDEX -
i can select text string before @ character:
sample entry in db: email@domain.com , sample output: email
with:
select substring_index(email,'@',1)
but command selecting text string after @ character ?
thank you
use negative value count
this:
select substring_index(email,'@',-1)
see documentation here:
http://dev.mysql.com/doc/refman/5.5/en/string-functions.html#function_substring-index
Comments
Post a Comment