SQL - NOT IN Operator
Definition
The NOT IN Operator in SQL is used to exclude multiple values from a query result. It returns records where the column value does not match any value in the specified list.
Example (SELECT):
SELECT * FROM student
WHERE city NOT IN ('Mumbai', 'Pune');
Example (UPDATE):
UPDATE student
SET status = 'Active'
WHERE city NOT IN ('Mumbai', 'Pune');
Example (DELETE):
DELETE FROM student
WHERE city NOT IN ('Mumbai', 'Pune');