create table tb(姓名 varchar(10),课程 varchar(10),分数 int)
insert into tb values('张三','语文',74)
insert into tb values('张三','数学',83)
insert into tb values('张三','物理',93)
insert into tb values('李四','语文',74)
insert into tb values('李四','数学',84)
insert into tb values('李四','物理',94)

select*from tb pivot(max(分数) for 课程 in (语文,数学,物理))a

  

相关文章:

  • 2021-08-01
  • 2021-05-01
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-06-26
  • 2021-10-01
  • 2021-06-08
  • 2021-05-01
  • 2022-12-23
相关资源
相似解决方案