ex. one table is having 1 column with 10 records ,
then how to display all the values in row wise ?
Answer Posted / dinesh a.
create table x (col1 number(4));
insert into x value(1);
....
...
insert into x value(10); /* upto 10 rows
then
select
substr(max(decode(rownum,1,col1,0)),1,2),
substr(max(decode(rownum,2,col1,0)),1,2),
substr(max(decode(rownum,3,col1,0)),1,2),
substr(max(decode(rownum,4,col1,0)),1,2),
substr(max(decode(rownum,5,col1,0)),1,2),
substr(max(decode(rownum,6,col1,0)),1,2),
substr(max(decode(rownum,7,col1,0)),1,2),
substr(max(decode(rownum,8,col1,0)),1,2),
substr(max(decode(rownum,9,col1,0)),1,2),
substr(max(decode(rownum,10,col1,0)),1,2)
from x
(where substr only to reduce display size )
Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
What is the scope of a local variable?
What is proxy method?
What is an Oracle index?
query optmization techniques and quwry analyser+projects+ppts
How to shutdown your 10g xe server from command line?
How to sort output in descending order in oracle?
Is java required for oracle client?
What are dml statements in oracle?
How to use attributes of the implicit cursor in oracle?
Explain the function of optimizer in oracle?
How to unlock the sample user account in oracle?
1) WIll all the user get the DEFAULT profile, if their current profile got deleted at any point of time? 2) What are the Situation we need to MOVE the TABLE between T.spaces? 3) What is the use of MOVING the TABLE between SCHEMA'S? 4) What are the Table Clause, Segment Clause and the Datafile Clause which will override each other? 5) Explain SORT_AREA_SIZE of Tempfile to make UNIFORM SIZE
Difference between hot backup vs. Cold backup?
Database is hung. Old and new user connections alike hang on impact. What do you do? Your SYS SQLPLUS session IS able to connect.
WHAT IS THE DEFINITION OF DEFAULT CUSTOMER IN AR?