SQL语句从邮箱地址里取出域名

用SQL语句从邮箱地址这一列里把域名取出,也就是要把所有@后面的字符串全部取出返回

SUBSTRING(OrgId,(CHARINDEX('@',OrgId)+1),LEN(OrgId) - (CHARINDEX('@',OrgId))) AS DomainName

Leave a Reply

Your email address will not be published. Required fields are marked *