sql - Remove all rows Except condition -
i remove rows table except when firstname
ben , isadmin
true
here sql
delete table1 (firstname <> 'ben' , isadmin = 1);
however, issue when isadmin
false... should remove row doesn't remove it. issue here?
the correct sql should be
delete table1 (firstname <> 'ben' or isadmin = 0);
Comments
Post a Comment