CREATE TABLE dbo.VendorMaster (VendorPK int, VendorName varchar(100)) CREATE TABLE dbo.OrderTable (OrderID int, VendorFK int, OrderDate Date, OrderAmount money) INSERT INTO dbo.VendorMaster VALUES (1, 'Vendor A'), (2, 'Vendor B') INSERT INTO dbo.OrderTable VALUES (1, 1, '1-1-2008', 100), (2, 2, '1-1-2009', 50)Suppose I want the names of those Vendors with an order in 2008. Assume the inserts above worked fine, and I have 2 vendor rows and 2 order rows. Yes, I could do this with a JOIN. But I'll do it with a subquery. I write the following:
SELECT * FROM dbo.VendorMaster WHERE VendorPK IN (SELECT VendorPK FROM dbo.OrderTable WHERE YEAR(OrderDate) = 2008)Will I get back...(choose only one answer)