MySQL supports another type of pattern matching operation based on the regular expressions, REGEXP operator used for pattern matching.
SELECT * FROM `users`, WHERE `email` REGEXP '^[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,63}$';
And now for your question of tracking multiple tables, you can use comma seperated table names right?
SELECT * FROM `users`, `customers`, `clients` WHERE `email` NOT REGEXP '^[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,63}$';
The following two tabs change content below.

Umar Farooque Khan
Founder at pTutorial
Umar Farooque Khan is Software developer and professional blogger serving Worldwide on freelancer and ODesk platform to show the capability of his skills. He is the founder of pTutorial.com. The main purpose of this site is sharing and exchanging of Knowledge related to the recent technologies.

Latest posts by Umar Farooque Khan (see all)
- Check whether image exists on remote server - February 11, 2019
- Limit Select2 to one selection per optgroup with multiple selection - February 10, 2019
- MySQL Select query to validate email - February 9, 2019