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 a collation and state the different types of collation sensitivity?

1234


how to convert .db (extention) database file into .dmp (extention ) for oracle database ?

2599


Is it possible to set second Primary Key Constraint in a table in Oracle Database ?

1225


Explain the use of analyse option in exp command.

1191


What is oracle host variable?

1130


How to insert a new row into a table in oracle?

1215


Can we connect to ORACLE db using Windows Authentication?

1308


How index is implemented in oracle database?

1043


How to install oracle database 10g xe?

1060


How to rename a tablespace in oracle?

1124


How can you use check constraints for self referential integrity?

1017


How to login to the server without an instance?

1213


Explain a synonym?

1086


State and explain the different types of data models?

992


Explain about achiever in sql?

1086