-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path6_non_equi_join.sql
More file actions
45 lines (35 loc) · 829 Bytes
/
6_non_equi_join.sql
File metadata and controls
45 lines (35 loc) · 829 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
--!= not equal to
--USING PARENT CHILD RELATIONSHIP
select *
from non_equi_join_test a,non_equi_join_test b
where a.S_NO != b.S_NO
--USING JOIN CONDITON
select *
from non_equi_join_test a
join
non_equi_join_test b
on a.S_NO != b.S_NO
--> greater than
--USING PARENT CHILD RELATIONSHIP
select *
from non_equi_join_test a,non_equi_join_test b
where a.S_NO > b.S_NO
--USING JOIN CONDITON
select *
from non_equi_join_test a
join
non_equi_join_test b
on a.S_NO > b.S_NO
--BETWEEN
--USING PARENT CHILD RELATIONSHIP
select *
from non_equi_join_test a,non_equi_join_test b
where a.S_NO BETWEEN 10 AND 40
and b.S_NO BETWEEN 30 AND 60
--USING JOIN CONDITON
select *
from non_equi_join_test a
join
non_equi_join_test b
on a.S_NO BETWEEN 10 AND 40
and b.S_NO BETWEEN 30 AND 60