Professional Documents
Culture Documents
MERGE
For more details,
https://oracle-base.com/articles/9i/merge-statement
INSERT ALL
https://www.oracletutorial.com/oracle-basics/oracle-insert-all/
Unconditional INSERT ALL, use to insert multiple records We can specify conditions to insert the reco
ACID Properties
s
pecify conditions to insert the records into different tables It inserts the record wherever the first condition is being m
he first condition is being met
How Oracle compares each and every value of T1 with T2
Table T1 Table T2
ID ID
1 NULL itration 1 itration 2 itration 3
2 3 0 1=null 0 2=null 0 3=null
3 4 0 1=3 0 2=3 1 3=3
NULL 5 0 1=4 0 2=4 0 3=4
3 5 0 1=5 0 2=5 0 3=5
4 0 1=5 0 2=5 0 3=5
T1 T2 JOIN COUNT
1 1 IJ "11"
1 1 ROJ "11+2=13"
2 1 LOJ "11+4=15"
2 2 FOJ "11+2+4=17"
3 3
NULL 3
NULL 3
7 NULL
8 5
Table1 Table2 LEFT OUTER JOIN
ID Name ID Name Table1 Table2
1 Sagar NULL Nayan 3 Viram 3 Kalpesh
2 Azim 3 Kalpesh 3 Chetan 3 Kalpesh
3 Viram 4 Hemant 4 Raam 4 Hemant
NULL Yogesh 5 Ajay 1 Sagar NULL NULL
3 Chetan 5 Junaid 2 Azim NULL NULL
4 Raam NULL Yogesh NULL NULL
Non matching
rows from
RIGHT Table CROSS JOIN
1 Sagar NULL Nayan
2 Azim NULL Nayan
3 Viram NULL Nayan
NULL Yogesh NULL Nayan
3 Chetan NULL Nayan
4 Raam NULL Nayan
1 Sagar 3 Kalpesh
2 Azim 3 Kalpesh
3 Viram 3 Kalpesh
NULL Yogesh 3 Kalpesh
3 Chetan 3 Kalpesh
4 Raam 3 Kalpesh
1 Sagar 4 Hemant
2 Azim 4 Hemant
3 Viram 4 Hemant
NULL Yogesh 4 Hemant
3 Chetan 4 Hemant
4 Raam 4 Hemant
1 Sagar 5 Ajay
2 Azim 5 Ajay
3 Viram 5 Ajay
NULL Yogesh 5 Ajay
3 Chetan 5 Ajay
4 Raam 5 Ajay
1 Sagar 5 Junaid
2 Azim 5 Junaid
3 Viram 5 Junaid
NULL Yogesh 5 Junaid
3 Chetan 5 Junaid
4 Raam 5 Junaid
1
4
5
8
9
10
11