product maker model type A 1232 PC A 1233 PC A 1276 Printer A 1298 Laptop A 1401 Printer A 1408 Printer A 1752 Laptop B 1121 PC B 1750 Laptop C 1321 Laptop D 1288 Printer D 1433 Printer E 1260 PC E 1434 Printer E 2112 PC E 2113 PC
SELECT distinct(maker) FROM Product WHERE type = 'pc' except SELECT distinct(maker) FROM product WHERE type = 'laptop';
SELECT * FROM Product WHERE type not in ('Laptop')
Select * from My_Table with (Nolock) where type='PC' and maker not in (Select maker from My_Table with (Nolock) where type='Laptop')
select * from ( select * from Product where type <> 'laptop') as t where t.type = 'pc'
select distinct E from product where type='PC'
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)