database - How to delete rows in MYSQL where a column doesn't contain certain data -


a database in charge of fixing got filled spam. there table called url in database. there column called alias. there 2,000 correct alias rows should there , other 100,000+ spam. have comma separated list of correct values should there. example value in alias z6j6h , 5 letters/numbers. how can delete every row not contain value in list?

delete   (table)  alias not in ('asdfg', 'abcde') 

Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

php - Find a regex to take part of Email -

javascript - Function overwritting -