我有这样的结果集结构
ID Value Name 1 Oranges Reponse 1 42 Count 2 Apples Reponse 2 65 Count 3 Figs Reponse 3 74 Count
我想谈谈这个:
ID Response Count 1 Oranges 42 2 Apples 65 3 Figs 74
使用sql.有没有办法做到这一点?谢谢!
解决方法
SELECT a.ID,a.Value AS [Response],b.Value AS [Count] FROM your_table AS a INNER JOIN your_table AS b ON a.ID = b.ID WHERE a.Name = 'Response' AND b.Name = 'Count'