how to check if a value exists in another table mysql 1

how to check if a value exists in another table mysql

SELECT *
FROM tableB
WHERE ID NOT IN (
  SELECT ID FROM tableA
);

Here is what the above code is Doing:
1. Select all the rows from tableB
2. Filter out the rows that are in tableA

Similar Posts