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 is transport network substrate (tns) in oracle?

585


How to run create database statement again?

618


How to lock and unlock a user account in oracle?

609


What is archive log in Oracle?

594


How do I spool to a csv formatted file using sqlplus?

542






What is a directory object?

585


Can we create trigger on materialized view in oracle?

559


How can I convert single byte kana characters into multi byte kana characters and vice-versa.

1931


How to name query output columns in oracle?

679


How would you configure your networking files to connect to a database by the name of DSS which resides in domain icallinc.com?

1464


how to handle exceptions in post production

942


In Oracle Applications We are Using Sub Ledger Accounting. When we Transfer the Data all modules (AP,AR,CE,FA) to SLA We done Some customizations? What are They??

1362


does the query needs a hint to access a materialized view?

1460


Explain the use of show option in imp command.

637


How to start a specific oracle instance?

580