sql find not in list 1

sql find not in list

SELECT * FROM TABLENAME WHERE ID NOT IN (1, 2, 3);

Here is what the above code is Doing:
1. We’re selecting all the rows from the table.
2. We’re filtering the rows by the ID column.
3. We’re using the NOT IN operator to exclude the rows with the IDs 1, 2, and 3.

Similar Posts