What's the difference between NOT IN and minus in SQL?

Database
Enthusiast

What's the difference between NOT IN and minus in SQL?

Hello Experts:

What's the difference between NOT IN and minus  in SQL? 

Which is better to use in SQL queries for the performance aspects?

Tags (1)
1 REPLY
Enthusiast

Re: What's the difference between NOT IN and minus in SQL?

Run an explain for the same functionality and same tables.  You can see the steps.

I tested and see that Minus is better than not in.