Quantcast
Channel: ฟอรัม Getting started with SQL Server
Viewing all articles
Browse latest Browse all 8428

Display horizontal rows vertically SQL Server 2008 R2

$
0
0

I ran the following query 

SELECT EMPID,ENAME,SALARY,DEPARTMENT from EMPLOYEE

and the result was this

EMPID     ENAME    SALARY   DEPARTMENT---------------------------------------------01        TEST1    2000     A/C02        TEST2    3000     SALES

but i want to show it like this 

EMPID       01     02

ENAME       TEST1   TEST2

SALARY      
2000   3000

DEPARTMENT  A
/C     SALES


Viewing all articles
Browse latest Browse all 8428

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>