Reputation: 75
I would like to find out what are the emails that are in my database that are not from @Gmail.com and @Yahoo.com and the email has more than 10 characters. Is this query possible?
I only managed to find out what emails are not from gmail :
SELECT * FROM `wp_users` WHERE `user_email` NOT LIKE '%@GMAIL.COM'
Thanks in advance!
Upvotes: 0
Views: 48
Reputation: 204746
Use and
to combine multiple conditions
SELECT * FROM wp_users
WHERE user_email NOT LIKE '%@GMAIL.COM'
AND user_email NOT LIKE '%@YAHOO.COM'
AND CHAR_LENGTH(user_email) > 10
Upvotes: 2