View Single Post
 
Old February 16th, 2010, 10:44 AM
budha budha is offline
Registered User
 
Join Date: Feb 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Transpose of data in a table...

hi friends,

create table goods(ITEM_NO number,
PRODUCT_NAME varchar2(20),
COMPANY_NAME varchar2(20));

insert into goods values(1,'TV','SONY');
insert into goods values(2,'COMPUTER','HP');

--------------------============--------------------
Generally when we select the data from a table the o/p format will be...

ITEM_NO PRODUCT_NAME COMPANY_NAME
1 TV SONY
2 COMPUTER HP

But, I want to print the the table in the below format...

ITEM_NO 1 2
PRODUCT_NAME TV COMPUTER
COMPANY_NAME SONY HP

Using oracle SQL or PL/SQL
Please, help me.