您的位置:首页 > 博客中心 > 数据库 >

数据库一列多行转一行多列

时间:2022-03-10 17:17

如题:

gxlsystem.com,布布扣



select
max(case when name=‘1‘ then [temp] else null end) as temp1
, max(case when name=‘2‘ then [temp] else null end) as temp2,
 max(case when name=‘3‘ then [temp] else null end) as temp3
from historyt group by time


gxlsystem.com,布布扣

数据库一列多行转一行多列,布布扣,bubuko.com

热门排行

今日推荐

热门手游