To use IN, you must have a set, use this syntax instead:
SELECT * FROM Table1 WHERE Table1.principal NOT IN (SELECT principal FROM table2)
More Related Contents:
- You can’t specify target table for update in FROM clause
- MySQL query finding values in a comma separated string
- Generating a range of numbers in MySQL
- How to get next/previous record in MySQL?
- SQLite INSERT – ON DUPLICATE KEY UPDATE (UPSERT)
- How do I make a row generator in MySQL?
- MySQL INSERT INTO table VALUES.. vs INSERT INTO table SET
- How can I merge two MySQL tables?
- Can table columns with a Foreign Key be NULL?
- SQL: Find the max record per group [duplicate]
- Mysql recursion?
- is there a group_concat function in ms-access?
- Is there an alternative to TOP in MySQL?
- How many rows in a database are TOO MANY?
- Why does this SQL code give error 1066 (Not unique table/alias: ‘user’)?
- Is it possible to have an indexed view in MySQL?
- mysql – how many columns is too many?
- Best database field type for a URL
- MySQL: How to copy rows, but change a few fields?
- How to renumber primary index
- Query that ignore the spaces
- mysql automatically store record creation timestamp
- Use A Union Or A Join – What Is Faster [closed]
- MySQL – how to front pad zip code with “0”?
- Find the number of columns in a table
- Mysql, reshape data from long / tall to wide
- MySQL: Compare differences between two tables
- Mysql strip time component from datetime
- How do I start auto increment from a specific point?
- How do MySQL views work?