mercredi 6 juillet 2016

MySQL - How to delete rows where column does not contain certain values?


I'm trying to delete all rows where a specific column does not contain certain strings. Like this:

DELETE * FROM table
WHERE Disease NOT LIKE (Malaria, HIV, E. coli O157);

I get this error: #1064 - You have an error in your SQL syntax; near '* FROM table WHERE Disease NOT LIKE (Malaria' at line 1


Aucun commentaire:

Enregistrer un commentaire