Delete two non-use entries in statement in Oracle
4 answers
You need to use OR
insteadAND
DELETE FROM EMPLOYEE WHERE EMP_ID=1 OR EMP_ID=2;
Please note that EMP_ID = 1 AND
EMP_ID = 2 does not match any records and therefore you are confused. IN is very similar to OR, so your query works with the IN clause since it matches EMP_ID = 1 or EMP_ID = 2;
+3
source to share