문제

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