how to select only id where is not in column mysql 1

how to select only id where is not in column mysql

SELECT * FROM Table1 WHERE Table1.principal NOT IN (SELECT principal FROM table2)

Here is what the above code is Doing:
1. Select all the rows from Table1
2. Filter out the rows that have a principal that is not in Table2

Similar Posts