本文介绍了sql server列到行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
MealNo MEAL 1 MEAL 2 MEAL 3 MEAL 4 MEAL 5
1 HOT DOG BURGER SAMOOSA CHIPS CAKE
2 CHEESE PIZZA SAUSAGE PIE FRIES
我想这样显示
I would like to display it like this
Meal 1 HOT DOG CHEESE
Meal 2 BURGER Pizza
Meal 3 SAMOOSA SAUSAGE
Meal 4 CHIPS PIE
Meal 5 CAKE FRIES
餐号是PKey,然后是餐1餐2餐3餐4餐5是列
Meal No is PKey then MEAL1 MEAL 2 MEAL 3 MEAL 4 MEAL 5 are columns
推荐答案
这篇关于sql server列到行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!