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
What is a trace file and how is it created in oracle?
What is the usage of synonyms?
 How to use an oracle sequence generator in a mapping?
What is save point in oracle database?
Give syntax for SQL and ORACLE joins.
What is oracle datasource?
what is the difference between data migration and production migration.
Other than making use of the statspack utility, what would you check when you are monitoring or running a health check on an Oracle 8i or 9i database?
What is meant by an index?
What is the difference between a primary key & a unique key?
How to check your oracle database 10g xe installation?
How to create a stored function in oracle?
List out the difference between commit, rollback, and savepoint?
What is varray?
How many categories of data types in oracle?