T-SQL 101: 119 Checking for Existence with EXISTS Subqueries
Sometimes what we’re interested in is just whether or not a row exists.
In the example shown, I’m saying I want to select product ID and description from the products table where there is at least one order line that has the picked quantity less than the ordered quantity. That means that someone ordered a certain number, but for some reason, we didn’t pick (i.e. got ready for shipment) the quantity that they wanted.
2025-02-22