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 are a collation and state the different types of collation sensitivity?
how to convert .db (extention) database file into .dmp (extention ) for oracle database ?
Is it possible to set second Primary Key Constraint in a table in Oracle Database ?
Explain the use of analyse option in exp command.
What is oracle host variable?
How to insert a new row into a table in oracle?
Can we connect to ORACLE db using Windows Authentication?
How index is implemented in oracle database?
How to install oracle database 10g xe?
How to rename a tablespace in oracle?
How can you use check constraints for self referential integrity?
How to login to the server without an instance?
Explain a synonym?
State and explain the different types of data models?
Explain about achiever in sql?