1) What is dense ranking?
2) Difference between Substring and Instring?
3) Case and Decode?
4) Pseudo column?
5) View vs Materialized views?
6) SQl performance tuning?

Answer Posted / ssk

1. DENSE_RANK is an Analytical Function which doesn't leave
gaps between the records. Coming to Rank function it leaves
gaps between the records.

Eg:

(RANK) (DENSE_RANK)

Sno Marks Ranks Sno Marks Ranks
----- ----- ----- ----- ----- -----
1 100 1 1 100 1
2 100 1 2 100 1
3 200 3 3 200 2
4 300 4 4 300 3
5 300 4 5 300 3
6 400 6 6 400 4

2. Substr will displays the text from position to TO position.
Instr returns the position of the character.

Eg: SELECT SUBSTR('ORACLE',2,4) FROM DUAL;
O/P : RAC

SELECT INSTR('ORACLE IS A DATABASE','A',1,2) from dual;
O/P : 11

3. PSEUDO Column : A column which is not an actual column in
the table. Eg : ROWNUM,ROWID,SYSDATE,USER,UID..

Is This Answer Correct ?    9 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the oracle differences between nvl and coalesce

516


Explain the difference between sap and oracle?

575


What are dml statements in oracle?

619


What is a partition in oracle?

545


Explain implicit cursor.

558






What is Segment Advisor in Oracle?

669


Oracle

1849


src name sex a,male b,female c,male d,female Required output : male female a,b c,d tried pivot but was not successfull select * from src pivot (max(name) for sex in ('MALE','FEMALE'));

1179


What are operators in oracle?

528


How to convert characters to numbers in oracle?

596


What is the data pump export utility?

643


How to manage transaction isolation level?

561


Explain the use of Merge statement in oracle 11g

596


WHAT IS THE DEFINITION OF DEFAULT CUSTOMER IN AR?

1705


What is format trigger?

1616