Instagram
youtube
Facebook
Twitter

Check for Customers with Invalid Emails

Check for Customers with Invalid Emails

Customers Table:


Query Explanation:
This simple pattern: %_@__%.__% checks for:

  • At least one character before @

  • At least two characters after @ and before .

  • At least two characters after the .


SQL Query:

SELECT 
    CustomerID, 
    CustomerName, 
    Email
FROM 
    Customers2
WHERE 
    Email NOT LIKE '%_@__%.__%';


Output: