exists the first tuple from the outer query, and then the related property values in the inner query, the inner query is processed, and if the inner where clause is true, the tuple of the outer layer is placed into the result set.
In first executes an inner query, stores the result in a temporary table, and then executes the outer query.
In does not process null, see, no results are returned.
Summarize:
There are fewer result set records in the inner query, and the result sets obtained in the outer query are large and indexed, and are suitable for in.
The result set record of the outer query is less, the table in the inner query is larger, it is suitable for exists.
The result set record of the outer query is more, and the result set in the inner query is small, which is suitable for not in.
The result set record of the outer query is less, the table in the inner query is larger, it is suitable to use not exists.
Oracle Exists/in