Delete row from mysql table where value not like -


i have table has results of tests.
looks like:

test    | result math    | pass science | fail history | cancelled french  | absent 

the table named table1. want delete rows in table value of column result not "pass" or "fail"

something like:

delete table1 result not in (pass, fail); 

the resulting table like:

test    | result math    | pass science | fail 

your example worked me adding quotes around pass , fail.

delete table1 result not in ('pass', 'fail') 

Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -