Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What are the differences between lov and list item?

1069


State and explain the different types of data models?

944


Her departmandaki isçilerden empno' su ikinci sirada olan isçilerin empno, deptno, hiredate, sira_no bigilerini döndüren sorguyu yaziniz?

1990


How to rename an existing table?

1129


What is Data Dictionary Cache in Oracle?

1168


In the oracle version 9.3.0.5.0, what does each number shows?

1303


What is the difference between a hot backup and a cold backup in oracle?

1019


How would you edit your CRONTAB to schedule the running of /test/test.sh to run every other day at 2PM?

1908


15. Display the item_cost and then truncate it to the nearest hundred, ten, unit, tenth and hundredth.

2293


How to define a data field as not null?

1110


Explain what are clusters?

1113


What are the different pseudo commands? Explain in general?

1080


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

2188


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?

2267


What do you mean by a deadlock?

1066