我有3列{PC,打印机,笔记本电脑} 我要产生结果集 壶拿着值{ 'HCL', 'ACER',HP} model_no PK 类型的表产品以下列制造商,电脑,打印机,笔记本电脑 如果一个制造商产生上述类别显示在相应列中是yes 否则否 即使制造商没有产品,以下代码也会显示为yes 要求使用while和break请帮助我SQL Server的情况下,问题
select maker,'PC'=
case type
when 'pc' then 'Yes'
when 'printer' then 'Yes'
when 'Laptop' then 'Yes'
else 'No'
end,
'Laptop'=
case type
when 'pc' then 'Yes'
when 'printer' then 'Yes'
when 'Laptop' then 'Yes'
else 'No'
end,'Printer'=
case type
when 'pc' then 'Yes'
when 'printer' then 'Yes'
when 'Laptop' then 'Yes'
else 'No'
end from product where maker='ACER'
这功课吗? (如果是这样,请使用作业标签) – 2011-04-04 08:17:03