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 a server parameter file in oracle?
What are the benefits of ordbms?
How to define an external table with a text file?
How to use subqueries in the from clause in oracle?
Using the relations and the rules set out in the notes under each relation, write statements to create the two sequence generators specified in the notes.
How to handle a single quote in oracle sql?
How do I manually create a database in oracle?
What are the system predefined user roles?
How to create an initialization parameter file?
Can select statements be used on views in oracle?
material view and view disadvantages?
query optmization techniques and quwry analyser+projects+ppts
How to bring a tablespace online?
Explain the features of oracle?
What is a data dictionary and how can it be created?