Skip to content

Commit b2e73a2

Browse files
Update Advanced SQL Joins SQL Statements.sql
1 parent 472e641 commit b2e73a2

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

Database Writings/Advanced SQL Joins/Advanced SQL Joins SQL Statements.sql

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,13 @@ SELECT a.Fruit,
101101
FROM ##TableA a INNER JOIN
102102
##TableB b ON ISNULL(a.Fruit,'') = ISNULL(b.Fruit,'');
103103

104+
--1.10
105+
SELECT a.Fruit
106+
FROM ##TableA a INNER JOIN
107+
##TableA b INNER JOIN
108+
##TableA c INNER JOIN
109+
##TableA d ON c.Fruit = d.Fruit ON b.Fruit = c.Fruit ON a.Fruit = b.Fruit;
110+
104111
-------------------
105112
--LEFT OUTER JOIN--
106113
-------------------
@@ -135,6 +142,14 @@ SELECT a.Fruit,
135142
(SELECT b.Fruit FROM ##TableB b WHERE a.Fruit = b.Fruit) AS Fruit
136143
FROM ##TableA a;
137144

145+
--2.6
146+
SELECT a.Fruit,
147+
b.Fruit,
148+
c.Fruit
149+
FROM ##TableA a RIGHT OUTER JOIN
150+
##TableB b ON a.Fruit = b.Fruit LEFT OUTER JOIN
151+
##TableA c ON b.Fruit = c.Fruit;
152+
138153
-------------------
139154
--FULL OUTER JOIN--
140155
-------------------

0 commit comments

Comments
 (0)