IN :
The inner query is executed first and the list of values obtained as its result is used by the outer query.
The inner query is executed for only once.
EXISTS
The first row from the outer query is selected ,then the inner query is executed and , the outer query output uses this result for checking.
This process of inner query execution repeats as many no.of times as there are outer query rows.
That is, if there are ten rows that can result from outer query, the inner query is executed that many no.of times.
Difference IN and EXISTS
In operator test for the particular value in the sub query and exist operator is a Boolean operator.so it works more efficient and faster than In operator
In operator scan all the values inside the IN block where as EXIST quit after 1st occurrence.
The inner query is executed first and the list of values obtained as its result is used by the outer query.
The inner query is executed for only once.
EXISTS
The first row from the outer query is selected ,then the inner query is executed and , the outer query output uses this result for checking.
This process of inner query execution repeats as many no.of times as there are outer query rows.
That is, if there are ten rows that can result from outer query, the inner query is executed that many no.of times.
Difference IN and EXISTS
In operator test for the particular value in the sub query and exist operator is a Boolean operator.so it works more efficient and faster than In operator
In operator scan all the values inside the IN block where as EXIST quit after 1st occurrence.
No comments:
Post a Comment