Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword or section
Like this
2Activity

Table Of Contents

0 of .
Results for:
No results containing your search query
P. 1
Oracle

Oracle

Ratings: (0)|Views: 106 |Likes:
Published by kiran0123456789

More info:

Published by: kiran0123456789 on Oct 27, 2011
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

09/19/2012

pdf

text

original

 
 
BASIC ORACLE
Ver:4 Rev Edi:November 2009
 
 
INDEX
1. INTRODUCTION............................................................................................................................................5
 
1.1
 
DATABASE.................................................................................................................................................5
 
1.2
 
RELATIONAL
 
DATABASE........................................................................................................................5
 
1.3
 
REALTING
 
MULTIPLE
 
TABLES:..............................................................................................................5
 
1.4
 
D
ATABASE
M
ODELS
:.....................................................................................................................................5
 
1.5
 
C
ODDS
R
ULES
...............................................................................................................................................6
 
1.6
 
T
HE
R
ELATIONAL
M
ODEL
..............................................................................................................................6
 
1.7
 
W
HAT IS
O
RACLE
?.........................................................................................................................................7
 
1.8
 
T
HE
O
BJECT
-R
ELATIONAL
M
ODEL
.................................................................................................................7
 
1.9
 
O
RACLE
10
G
N
EW
F
EATURES
.........................................................................................................................7
 
1.10
 
D
ATABASE
U
SERS AND
S
CHEMAS
...............................................................................................................10
 
1.10.1 Security Domain.................................................................................................................................10
 
1.10.2 Schema Objects..................................................................................................................................10
 
1.10.3 Nonschema Objects............................................................................................................................11
 
1.11
 
O
RACLE
P
RODUCTS INCLUDE
:....................................................................................................................12
 
1.12
 
SQL
 
S
UPPORTS
T
HE
F
OLLOWING
C
ATAGORIES
O
F
C
OMANDS
:-...................................................................12
 
1.12.1 Data Definition Language (DDL) Statements......................................................................................12
 
1.12.2 Data Manipulation Language (DML) Statements................................................................................12
 
1.12.3 Data control laguage(DCL) statements..............................................................................................12
 
1.12.4 Transaction Control Statements..........................................................................................................12
 
1.13
 
T
RANSACTIONS
..........................................................................................................................................13
 
1.14
 
SELECT
 
S
TATEMENT
................................................................................................................................13
 
Q
UESTIONS
.......................................................................................................................................................14
 
2. RESTRICTING AND SORTING DATA.......................................................................................................15
 
2.1
 
C
OMPARISON OPERATORS
............................................................................................................................15
 
2.1.1 Between --- and ---...............................................................................................................................15
 
2.1.2 IN (set).................................................................................................................................................15
 
2.1.3 Like condition ......................................................................................................................................15
 
2.1.4 ALL and ANY.......................................................................................................................................16 
 
2.2
 
L
OGICAL OPERATORS
...................................................................................................................................16
 
2.3
 
ORDER
 
BY
 
C
LAUSE
...................................................................................................................................17
 
2.4
 
T
HE
SAMPLE
 
C
LAUSE
................................................................................................................................17
 
Q
UESTIONS
.......................................................................................................................................................18
 
3. SQL FUNCTIONS..........................................................................................................................................19
 
3.1
 
T
YPES OF FUNCTIONS
...................................................................................................................................19
 
3.2
 
C
HARACTER
F
UNCTIONS
:.............................................................................................................................19
 
 
LENGTH: SHOWS THE LENGTH OF A STRING AS A NUMERIC VALUE.
......................................19
 
 
LPAD:PADS THE CHARACTER VALUE RIGHT_JUSTIFIED
.............................................................19
 
3.3
 
NUMBER
 
FUNCTIONS.............................................................................................................................20
 
3.4
 
D
ATE
F
UNCTIONS
........................................................................................................................................20
 
3.5
 
G
ENERAL
C
OMPARISON
F
UNCTIONS
.............................................................................................................22
 
3.6
 
C
ONVERSION
F
UNCTIONS
.............................................................................................................................23
 
3.7
 
T
HE
RR
 
D
ATE FORMAT
E
LEMENT
................................................................................................................23
 
3.8
 
GENERAL
 
FUNCTIONS...........................................................................................................................24
 
3.9
 
G
ROUP
F
UNCTIONS
(
OR
)
 
M
ULTIPLE
R
OW
F
UNCTIONS
....................................................................................26
 
3.10
 
GROUP
 
BY
 
CLAUSE...............................................................................................................................27
 
3.11
 
U
SE THE
HAVING
CLAUSE TO RESTRICT GROUPS
:......................................................................................27
 
 
 3.12
 
P
ARTITION OUTER
J
OIN IN
O
RACLE
10
G
......................................................................................................28
 
Q
UESTIONS
.......................................................................................................................................................28
 
4. DISPLAYING DATA FROM MULTIPLE TABLES.................................................................................29
 
4.1
 
S
ET
O
PERATORS
..........................................................................................................................................29
 
4.2
 
R
ELATING DATA THROUGH JOIN CONCEPT
.....................................................................................................30
 
4.3
 
S
IMPLE JOIN
................................................................................................................................................30
 
4.4
 
U
SING
T
ABLE
A
LIASES
................................................................................................................................30
 
4.5
 
N
ON
-E
QUI
J
OINS
..........................................................................................................................................30
 
4.6
 
S
ELF
J
OINS
..................................................................................................................................................31
 
4.7
 
O
UTER JOIN
.................................................................................................................................................31
 
4.8
 
C
ARTESIAN
P
RODUCTS
................................................................................................................................31
 
Q
UESTIONS
.......................................................................................................................................................32
 
5. SUB QUERIES...............................................................................................................................................33
 
5.1
 
U
SE SUBQUERIES FOR THE FOLLOWING PURPOSES
:........................................................................................33
 
5.2
 
T
YPES OF
S
UBQUERES
..................................................................................................................................33
 
5.3
 
E
XECUTING
S
INGLE
-R
OW
S
UBQUERIES
.........................................................................................................33
 
5.4
 
M
ULTIPLE
-R
OW SUBQUERIES
.......................................................................................................................34
 
5.5
 
C
ORRELATED
S
UBQUERIES
...........................................................................................................................34
 
Q
UESTIONS
.......................................................................................................................................................36
 
6. CONSTRAINTS.............................................................................................................................................37
 
6.1
 
D
ATATYPES
.................................................................................................................................................37
 
6.2
 
D
ATA
D
EFINITION
L
ANGUAGE
.....................................................................................................................39
 
6.2.1 Create table command: ........................................................................................................................39
 
6.2.2 Command To alter a table....................................................................................................................40
 
6.2.3 Command to rename a column..............................................................................................................40
 
6.2.4 Command to drop a column..................................................................................................................40
 
6.2.5 Command to Truncate a table...............................................................................................................41
 
6.2.6 Command to Drop a table ....................................................................................................................41
 
6.3
 
D
ATA
M
ANIPULATION
L
ANGUAGE
...............................................................................................................41
 
6.3.1 Insert Command...................................................................................................................................41
 
6.3.2 Update Command.................................................................................................................................42
 
6.3.3 Delete Command..................................................................................................................................42
 
6.3.4 Merge Command..................................................................................................................................42
 
6.4
 
D
ATACONTROL
L
ANGUAGE
C
OMMANDS
.......................................................................................................42
 
6.4.1 Grant privilage command.....................................................................................................................42
 
6.4.2 Revoke privilage command...................................................................................................................43
 
6.5
 
T
RANSACTION
C
ONTROL
L
ANGUAGE
............................................................................................................43
 
6.6
 
I
NTEGRITY
C
ONSTRAINTS
............................................................................................................................44
 
6.6.1 Domain Integrity Constraints:..............................................................................................................44
 
6.6.2 Entity Integrity constraint.....................................................................................................................44
 
6.6.3 Referential integrity constraint.............................................................................................................44
 
6.6.4 Define Constriants ...............................................................................................................................45
 
Q
UESTIONS
.......................................................................................................................................................47
 
7. DATABASE OBJECTS..................................................................................................................................48
 
7.1
 
S
YNONYMS
..................................................................................................................................................48
 
SYNTAX
:...........................................................................................................................................................48
 
7.2
 
S
EQUENCES
:...............................................................................................................................................48
 
7.3
 
VIEW.........................................................................................................................................................51
 
7.4
 
“TOP-N”
 
A
NALYSIS
...................................................................................................................................52
 
7.5
 
INDEX.......................................................................................................................................................53
 
7.5.1 Unique and Nonunique Indexes............................................................................................................53
 
7.6
 
D
ATA
D
ICTIONARY
......................................................................................................................................54
 

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->