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 the differences between lov and list item?
State and explain the different types of data models?
Her departmandaki isçilerden empno' su ikinci sirada olan isçilerin empno, deptno, hiredate, sira_no bigilerini döndüren sorguyu yaziniz?
How to rename an existing table?
What is Data Dictionary Cache in Oracle?
In the oracle version 9.3.0.5.0, what does each number shows?
What is the difference between a hot backup and a cold backup in oracle?
How would you edit your CRONTAB to schedule the running of /test/test.sh to run every other day at 2PM?
15. Display the item_cost and then truncate it to the nearest hundred, ten, unit, tenth and hundredth.
How to define a data field as not null?
Explain what are clusters?
What are the different pseudo commands? Explain in general?
Iam learning oracle developer 2000.. can anyone give me then tutorials sites or PDF related to developer 2000 please send me the details @ mak2786@gmail.com thanks Arun
How many objectname will be created for a single table drop function? Why 'flashback' query giving error "ORA-38312: original name is used by an existing object" while getting the table?
What do you mean by a deadlock?