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 is the usage of save points in oracle database?

903


Why does oracle 9i treat an empty string as null?

974


How to add another datafile to a tablespace?

989


What are the most common interview questions on ETL Testing for experience?

1074


How to update values in a table in oracle?

957


What are the different oracle database objects?

1029


What is a package in oracle?

1023


What is the data pump import utility?

966


How to create lov dynamically at runtime & attach to text field?

1096


How can I combine multiple rows into a comma-delimited list in oracle?

998


How does oracle handle read consistency?

1049


What is oracle datasource?

919


Explain the use of tables option in exp command.

1051


How to assign values to variables?

1042


Explain what are the characteristics of data files?

1029