大家好,我正在尝试迁移到新的邮件服务器,所以我想编写 Mysql 脚本以返回如下表,然后将结果导出为 CSV 文件 sql 语句,如下所示
`select email,clear,email AS domain from postfix_users `
我想在域名之前对@和@符号本身之前的任何字符进行子串化,任何想法都会有很大帮助
mysql> select email,clear,email AS domain from postfix_users ;
+---------------------------+--------+---------------------------+
| email | clear | domain |
+---------------------------+--------+---------------------------+
| user@domain.tld | passw | user@domain.tld |
+---------------------------+--------+---------------------------+