I have a table emp. There is only one column in the table.
In that , there are only three rows in that column.
The value in the first row is 'A' and the value in the
second row is 'B' and the third row is 'C'. Now, my question
is ,
How will you write a select query to display the output as
B
C
A
Note: order by cannot be used coz it gives us output as CBA.
But the output should be BCA.
Answer Posted / garv
SELECT DECODE (EEE,'A','B','B','C','A') EEE
FROM EMP
--EEE IS COLUMN NAME OF TABLE EMP
| Is This Answer Correct ? | 9 Yes | 3 No |
Post New Answer View All Answers
What is the usage of save points in oracle database?
Why does oracle 9i treat an empty string as null?
How to add another datafile to a tablespace?
What are the most common interview questions on ETL Testing for experience?
How to update values in a table in oracle?
What are the different oracle database objects?
What is a package in oracle?
What is the data pump import utility?
How to create lov dynamically at runtime & attach to text field?
How can I combine multiple rows into a comma-delimited list in oracle?
How does oracle handle read consistency?
What is oracle datasource?
Explain the use of tables option in exp command.
How to assign values to variables?
Explain what are the characteristics of data files?