Domanda

I want to delete all users who have the email address of @trash-mail.com

How can I do that with a SQL? I'm trying this

DELETE from users    
WHERE email LIKE %trash-mail.com

But it's not working and I really need to be able to delete mass accounts.

È stato utile?

Soluzione

You forgot quotes:

DELETE FROM users    
WHERE email LIKE '%trash-mail.com'

See http://www.techonthenet.com/sql/like.php for more information on the LIKE condition.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top