mysql与SUBSTRING_INDEX相对

mos*_*d77 3 mysql substring

我可以在@字符前选择文本字符串:

数据库中的示例条目:email@domain.com,示例输出:电子邮件

有:

SELECT SUBSTRING_INDEX(email,'@',1)
Run Code Online (Sandbox Code Playgroud)

但在@字符后选择文本字符串的命令是什么?

谢谢

Mik*_*ant 6

count像这样使用负值:

SELECT SUBSTRING_INDEX(email,'@',-1)
Run Code Online (Sandbox Code Playgroud)

请参阅此处的文档:

http://dev.mysql.com/doc/refman/5.5/en/string-functions.html#function_substring-index