This should work I guess...declare @supplier table (supplier_id int,supplier_name varchar(10))insert @supplierselect 1,'supplierA' union allselect 2,'supplierB' union allselect 3,'supplierC'declare @product table (product_id int,product_name varchar(10))insert @productselect 1,'productA' union allselect 2,'productB' union allselect 3,'productC'declare @connection table (supplier_id int,product_id int)insert @connectionselect 1,1 union allselect 2,3 union allselect 3,2
select t.supplier_name,t.product_name from(select * from @supplier a cross join @product b ) tleft join @connection con t.supplier_id = c.supplier_id and t.product_id = c.product_idwhere c.supplier_id is null