I need to detect the TLD on a large database of users' email addresses via SQL query.
Email addresses are stored as a field in a row. It's organized kindof like:
id username email
1 steve steve@place.com
2 bill bill@fake.asdf
I'm trying to detect if the TLD doesn't match "com" or "org" or "net", and ONLY return those values from the database which do not match those particular TLDs. Obviously in this case, only the user with id 2 will be fetched.
This has to occur in the SQL query.