The Left Anti Semi Join operator is used in an execution plan to return rows from the left table (or outer input) that do not have matching rows in the right table (or inner input).When we are using the Not In or NOT EXISTS in our query then Left Anti Semi Join seen in the execution plan.
See the example
For the demo we are creating tables and inserted some
records.
CREATE TABLE customers INSERT INTO Customers (CustomerID, CustomerName) VALUES (1, 'Bagesh'), (2, 'Rajesh'), (3, 'Ganesh'), (4, 'Mahesh'); VALUES (101, 1, 250.00), (102, 1, 300.00), (103, 3, 700.00); |
Let’s run the below query and see the execution plan
SELECT customerid, |
See the execution plan
If we are using NOT IN then also we can see this operator.
SELECT customerid, |
Run and see the execution plan
No comments:
Post a Comment
If you have any doubt, please let me know.