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

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -