【发布时间】:2021-06-16 16:30:29
【问题描述】:
我有如下表A:
ID QuestionCode Question
1 Q1 What is your name
2 Q2 How old are you
3 Q3 Where are you from
另外,我有如下表 B:
UserId Q1 Q2 Q3
1 Ahmad 22 Egypt
2 John 31 USA
3 Daniel 32 Mexico
我想要的是使用问题本身而不是列名中的代码创建一个视图,例如:
UserId What Is Your Name How old are you Where are you from
1 Ahmad 22 Egypt
2 John 31 USA
3 Daniel 32 Mexico
最好的方法是什么?任何帮助将不胜感激。
谢谢。
【问题讨论】:
标签: sql sql-server sql-server-2016