Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Select distinct domain name from an email field?

Status
Not open for further replies.

jimoblak

Instructor
Oct 23, 2001
3,620
US
Is it possible to select distinct domain names from an email field in a table in a single statement, extracting the domain after the token '@'?
 
Should be this I think :

Code:
SELECT SUBSTRING_INDEX('user@domain.com', '@', -1)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top