I need to look up all households with orders. I don't care about the data of the order at all, just that it exists. (Using SQL Server)
Is it more efficient to say something like this:
SELECT HouseholdID, LastName, FirstName, Phone
FROM Households
INNER JOIN Orders ON Orders.HouseholdID = Households.HouseholdID
or this:
SELECT HouseholdID, LastName, FirstName, Phone
FROM Households
WHERE EXISTS
(SELECT HouseholdID
FROM Orders
WHERE Orders.HouseholdID = Households.HouseholdID)