i have emp table as follows
Empid Empname Month Salary
1 A 1 3000
2 B 2 5000
3 C 3 8000
4 D 4 9000
5 E 5 7000
from the above i want the output as follows
Empid Empname 1 2 3 4 5
1 A 3000 5000 8000 9000 7000
from getting a above output how to write the query in sql server
Empid Empname Month Salary
1 A 1 3000
2 B 2 5000
3 C 3 8000
4 D 4 9000
5 E 5 7000
from the above i want the output as follows
Empid Empname 1 2 3 4 5
1 A 3000 5000 8000 9000 7000
from getting a above output how to write the query in sql server

Ramesh PalanivelRank #372 · 6.8K reputationPosted Mar 18, 2017, 5:19 AM EDT
Rajeev PunhaniRank #551 · 4.4K reputationPosted Mar 18, 2017, 5:53 AM EDT