101 computer
102 english
103 electric
要求输出下面这样的:
101 102 103
computer english electric是道面试题,以前老师有讲过 现在不记得了了!
102 english
103 electric
要求输出下面这样的:
101 102 103
computer english electric是道面试题,以前老师有讲过 现在不记得了了!
max(decode(字段1,'103',字段2,null) as '103') from table
/
能给一个SQL Server2000中的语句吗 ?
把decode改成case when,
select max(case when 字段1='101' then 字段2 else null end) as '101',
max(case when 字段1='102' then 字段2 else null end) as '102',
max(case when 字段1='103' then 字段2 else null end)
from table