Documente Academic
Documente Profesional
Documente Cultură
B.Bhuvaneswaran
Assistant Professor (SS)
Department of Computer Science & Engineering
Rajalakshmi Engineering College
Thandalam
Chennai 602 105
bhuvaneswaran@rajalakshmi.edu.in
Rename Table
Example
Rank Function
as an Aggregate function or
as an Analytic function.
As An Aggregate Function
Example
As An Analytic Function
Example
Dense_rank Function
as an Aggregate function or
as an Analytic function.
As An Aggregate Function
Example
As An Analytic Function
DENSE_RANK() OVER
( [ query_partition_clause] ORDER BY
clause )
Example
Decode Function
Example
SELECT supplier_name,
DECODE(supplier_id, 10000, 'IBM',
10001, 'Microsoft',
10002, 'Hewlett Packard', 'Gateway')
result FROM suppliers;
Regexp_like Condition
Match On Beginning
Match On End
Sequences (Autonumber)
Example
Example
Dual Table
The DUAL is special one row, one column
table present by default in all Oracle
databases.
The owner of DUAL is SYS (SYS owns the
data dictionary, therefore DUAL is part of
the data dictionary.) but DUAL can be
accessed by every user.
The table has a single VARCHAR2(1)
column called DUMMY that has a value of
'X'.
Examples
DESC DUAL;
SELECT * FROM DUAL;
SELECT COUNT(*) FROM DUAL;
SELECT 'ABCDEF12345' FROM DUAL;
SELECT 123792.52 FROM DUAL;
SELECT sysdate FROM DUAL ;
SELECT 15+10-5*5/5 FROM DUAL;
SELECT level FROM DUAL CONNECT BY
level <=10;
References
References
http://www.techonthenet.com