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 / eswar reddy

declare one cursor ,PL/SQL TABLE
IN DBMS MENTIONED PRIOR,LAST,FIRST

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is dynamic SGA and static SGA

4058


What is the order of defining local variables and sub procedures/functions?

823


How to drop a stored function?

877


can anyody please send me the dump for Oracle 10g certifications for DBA path?

1916


What is system global area (sga) in oracle?

773


Why packages are used in oracle?

787


> CREATE OR REPLACE FUNCTION FACTORIAL_1(factstr varchar2 ) 2 RETURN NUMBER AS 3 new_str VARCHAR2(4000) := factstr||'*' ; 4 fact number := 1 ; 5 BEGIN 6 7 WHILE new_str IS NOT NULL 8 LOOP 9 fact := fact * TO_NUMBER(SUBSTR(new_str,1,INSTR(new_str,'*')-1)); 10 new_str := substr( new_str,INSTR(new_str,'*')+1); 11 END LOOP; 12 13 RETURN fact; 14 15 END; explanation Above program?

1797


what is normalisation?what are its uses?

1949


while i take backup using ibm tsm the following errors occurred: rman-03009 ora-19513 ora-27206 ora-19502 ora-27030 ora-ora19511

4125


How to declare a local variable?

806


How i can handle exception in large code like 1000 line without distrubing the code or without exception handler sction?

2958


What is Redo Log Buffer in Oracle?

833


What to do if the binary spfile is wrong for the default instance?

773


What is an oracle wallet?

673


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

2324