質問

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.

役に立ちましたか?

解決

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.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top