SQL tutorial 27: Right Outer Join in SQL by Manish Sharma for RebellionRider

Manish Sharma · Advanced ·🤖 AI Agents & Automation ·12y ago

Key Takeaways

Discusses Right Outer Join in SQL with examples and syntax

Full Transcript

what's up internet this is Manish from rebellion.com and today in this SQL tutorial we will see what right outer joint is as the name suggest right outer joint is a form of outer joint that returns each and every record from The Source table and returns only those value from the target table that fulfill the join condition since we are talking about right outter joint hence Source table is the one situated on the right side of the right outer joint Clause where the target table is the one on the left side of this clause so let's jump over the SQL Developer and start with the tutorial to make this concept easy to understand let's quickly create two tables the name of our first table will be EMP and it will be having three columns by the name of EMP ID EMP name and EMP salary Here Comes EMP ID will be the primary key let's create now we have our EMP table let's create a second table the name of our second table will be D and this table will consist three columns D ID D name and EMP ID here DP ID will be the primary key and the column EMP ID will be the foreign key reference from our first table EMP let's create now we have created both our table let me insert some data into these table so that we can use them to understand this concept okay I have inserted the data now let me show you the data in both these table we have five rows in EMP table now data in the D table here as you can see we have five department sales account Finance it and marketing and corresponding to each department we have the employee ID if you remember EMP ID is a foreign key constant here sales department 1 has employee ID 1 meaning employee with employee ID one which is Steve work in sales department similarly employee with employee ID 2 work in account and employee ID 3 work in finance department but none of the employee work in it and marketing department as we haven't assigned any employee ID here now let's start with the queries so table is created data is inserted now we are all set and good to go so let's do our first query of write out a join our first query will be the simplest one and here we will see how to use right outter joint with on claw but before that let me clear this output panel and make some space here so that you people can see what's going on here in this cery we are selecting EMP name from EMP table and D name from D table and as you can see here table EMP is on the right hand side of our right outer joint Clause thus it's a source table and table DD is on the left hand side of right outer join Clause thus it's a Target table and next is our join condition basically there are two join condition on and using we will see how to use right outo join with using join condition in our next query but for this one we will concentrate over on join condition as it's on join condition then it become mandate for us to compare columns from both source and Target table now when should we use on joint condition in SQL joins you ask first when column which are participating in on jooin condition have different name and same data type or when columns which are participating in on join condition have same name and same data type so let's execute the cery and check out the result here is our result as you can see in this result all the records from EMP table which is our source table are returned but only those column from Target table D are returned which satisfy the expression in onjoin condition now quy 2 but before that let me clear this output panel in our last query we saw how to use right outer joint with on joint condition now we will see how to use right outer joint with using clause for that we will use the same previous cery that's why we will copy this cury and paste it right here and then after we will modify it so here is our cery now we typically apply using Clause with joints in SQL under two circumstances first when we are performing equ joint this means that whenever we use equal to comparison operator for comparing columns over which we want to put join secondly using Clause is also used when the name and data type of column over which you want to put join in your cury is same to read more about equ join you can read SQL join article on my website the link for that is in the description box below when both these condition are satisfied then we can use using Clause let's use it as both on and using Clause are join condition we can use only one at a time and not together together in using Clause we just have to supply name of a column over which we want to emphasize join let's execute this query here is our result which is the same as previous cury now let's check out our third cury we use wear Clause when we want to filter the result written by our Cy in the previous cury we were extracting employees name with the Department name in which they were working say now you want to extract only those employees who have salary greater than 50,000 for this our cury will be the same as previous but along with an additional wear Clause as our query will be the same as previous so we are going to copy this query and paste it here and now we will modify it accordingly we just have to put wear Clause after the using or on clause which is our joint condition you just simply have to write where and your expression here this is our expression now let's execute here is our result that is all on right outer joint for now keep watching for more interesting videos also kindly subscribe share and like thanks for watching this is Manish from Rebellion Rider

Original Description

Links WebLink: http://bit.ly/right-outer-join SQL Tutorial 17 (Primary key) http://youtu.be/jB1btTR_b4s SQL Tutorial 18 (Foreign key) http://youtu.be/0nbkBI5r3Gw This SQL tutorial is about Right Outer Join. Here you will get Right Outer Join with ON clause Right Outer Join with USING clause and Right Outer Join with WHERE Clause. All with Examples Tool used in this tutorial is SQL Developer. This tutorial series is part of SQL expert exam certification training. if you are preparing for SQL certification you can use my tutorials. This SQL Tutorial is a part of free training. Copy Cloud referral link || Use this link to join copy cloud and get 20GB of free storage https://copy.com?r=j7eYO7 Contacts E-Mail RebellionRiderYT@gmail.com Linkedin. http://in.linkedin.com/in/mannbhardwaj/ Twitter https://twitter.com/rebellionrider Instagram http://instagram.com/rebellionrider Facebook. https://www.facebook.com/imthebhardwaj Thanks for liking, commenting, sharing and watching more of our videos This is Manish from RebellionRider.com
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from Manish Sharma · Manish Sharma · 33 of 60

1 Oracle Database tutorials 1: How to install Oracle Database 11g on windows 7
Oracle Database tutorials 1: How to install Oracle Database 11g on windows 7
Manish Sharma
2 Oracle Database tutorials 2:How To install SQL Developer on windows 7
Oracle Database tutorials 2:How To install SQL Developer on windows 7
Manish Sharma
3 Oracle Database tutorials 3:How to enable Line numbers in SQL Developer.
Oracle Database tutorials 3:How to enable Line numbers in SQL Developer.
Manish Sharma
4 Oracle Database tutorials 4:  database connectivity using SQL developer and command prompt
Oracle Database tutorials 4: database connectivity using SQL developer and command prompt
Manish Sharma
5 Oracle Database tutorials 5:  how to Fetch Data using SELECT - SQL statement by Manish Sharma
Oracle Database tutorials 5: how to Fetch Data using SELECT - SQL statement by Manish Sharma
Manish Sharma
6 Oracle Database11g tutorials 6 | | How to use Concatenation operator, character String
Oracle Database11g tutorials 6 | | How to use Concatenation operator, character String
Manish Sharma
7 Oracle Database11g tutorials 7 | |SQL DISTINCT keyword || SQL tutorials
Oracle Database11g tutorials 7 | |SQL DISTINCT keyword || SQL tutorials
Manish Sharma
8 Canon EOS 600D 2 lens kit/Canon rebell EOS T3i 2 lens kit Unboxing
Canon EOS 600D 2 lens kit/Canon rebell EOS T3i 2 lens kit Unboxing
Manish Sharma
9 First look: ORACLE CERTIFIED ASSOCIATE (OCA) CERTIFICATE  - ORACLE DATABASE ADMINISTRATOR
First look: ORACLE CERTIFIED ASSOCIATE (OCA) CERTIFICATE - ORACLE DATABASE ADMINISTRATOR
Manish Sharma
10 Oracle Database11g tutorials 8 || SQL DISTINCT with multiple columns |SQL Distinct with Two columns
Oracle Database11g tutorials 8 || SQL DISTINCT with multiple columns |SQL Distinct with Two columns
Manish Sharma
11 Oracle Database11g tutorials 9 || What is archive log mode and how to enable archive log mode
Oracle Database11g tutorials 9 || What is archive log mode and how to enable archive log mode
Manish Sharma
12 Oracle Database11g tutorials 10 ||  SQL Single Row Function (SQL Functions )
Oracle Database11g tutorials 10 || SQL Single Row Function (SQL Functions )
Manish Sharma
13 Oracle Database11g tutorials 11: SQL case manipulation function in Oracle Database
Oracle Database11g tutorials 11: SQL case manipulation function in Oracle Database
Manish Sharma
14 how to add channel trailer and section on your youtube channel 2014
how to add channel trailer and section on your youtube channel 2014
Manish Sharma
15 Oracle Database11g tutorials 12 || SQL Concat Function - SQL character manipulation function
Oracle Database11g tutorials 12 || SQL Concat Function - SQL character manipulation function
Manish Sharma
16 Oracle Database11g tutorials 13 || SQL substr function / SQL substring function
Oracle Database11g tutorials 13 || SQL substr function / SQL substring function
Manish Sharma
17 Oracle Database11g tutorials 14 : How to CREATE TABLE using sql developer and command prompt
Oracle Database11g tutorials 14 : How to CREATE TABLE using sql developer and command prompt
Manish Sharma
18 SQL tutorials 15 || How To CREATE TABLE using enterprise manager 11g
SQL tutorials 15 || How To CREATE TABLE using enterprise manager 11g
Manish Sharma
19 Oracle Database11g tutorials 16: How to uninstall oracle 11g from windows 7 64 bit
Oracle Database11g tutorials 16: How to uninstall oracle 11g from windows 7 64 bit
Manish Sharma
20 ORACLE CERTIFIED PROFESSIONAL(OCP) CERTIFICATE First look  - ORACLE DATABASE ADMINISTRATOR
ORACLE CERTIFIED PROFESSIONAL(OCP) CERTIFICATE First look - ORACLE DATABASE ADMINISTRATOR
Manish Sharma
21 Plantronics audio 655 USB headset with Mic Unboxing and Review and Plantronics audio 655 Mic test
Plantronics audio 655 USB headset with Mic Unboxing and Review and Plantronics audio 655 Mic test
Manish Sharma
22 SQL tutorials 17: SQL Primary Key constraint,  Drop primary Key
SQL tutorials 17: SQL Primary Key constraint, Drop primary Key
Manish Sharma
23 SQL tutorials 18: SQL Foreign Key Constraint By Manish Sharma
SQL tutorials 18: SQL Foreign Key Constraint By Manish Sharma
Manish Sharma
24 SQL tutorial 19: ON DELETE SET NULL clause of Foreign Key By Manish Sharma (RebellionRider)
SQL tutorial 19: ON DELETE SET NULL clause of Foreign Key By Manish Sharma (RebellionRider)
Manish Sharma
25 SQL tutorials 20: On Delete Cascade Foreign Key By Manish Sharma (RebellionRider)
SQL tutorials 20: On Delete Cascade Foreign Key By Manish Sharma (RebellionRider)
Manish Sharma
26 SQL tutorial 21: How To Rename Table in SQL using ALTER TABLE statement By Manish Sharma
SQL tutorial 21: How To Rename Table in SQL using ALTER TABLE statement By Manish Sharma
Manish Sharma
27 SQL tutorial 22: How to Add / Delete column from an existing table using alter table
SQL tutorial 22: How to Add / Delete column from an existing table using alter table
Manish Sharma
28 SQL tutorial 23: Rename and Modify Column Using Alter Table By Manish Sharma (RebellionRider)
SQL tutorial 23: Rename and Modify Column Using Alter Table By Manish Sharma (RebellionRider)
Manish Sharma
29 SQL tutorial 24 :SQLJoins- Natural Join With ON and USING clause By Manish/Rebellionrider
SQL tutorial 24 :SQLJoins- Natural Join With ON and USING clause By Manish/Rebellionrider
Manish Sharma
30 Oracle Database11g tutorials 25: How to install Oracle Database 11g Express Edition R2 on Windows 7
Oracle Database11g tutorials 25: How to install Oracle Database 11g Express Edition R2 on Windows 7
Manish Sharma
31 SQL tutorial 26: Introduction to SQL Joins in Oracle Database
SQL tutorial 26: Introduction to SQL Joins in Oracle Database
Manish Sharma
32 Vidcon 2014 YouTube Fan Funding: How to enable fan funding on YouTube Channel
Vidcon 2014 YouTube Fan Funding: How to enable fan funding on YouTube Channel
Manish Sharma
SQL tutorial 27: Right Outer Join in SQL by Manish Sharma for RebellionRider
SQL tutorial 27: Right Outer Join in SQL by Manish Sharma for RebellionRider
Manish Sharma
34 SQL tutorial 28: Left Outer Join By Manish Sharma / RebellionRider
SQL tutorial 28: Left Outer Join By Manish Sharma / RebellionRider
Manish Sharma
35 SQL tutorial 29: Full Outer Join with example By Manish Sharma/ RebellionRider
SQL tutorial 29: Full Outer Join with example By Manish Sharma/ RebellionRider
Manish Sharma
36 SQL tutorial 30: Inner Join In SQL by Manish Sharma/RebellionRider
SQL tutorial 30: Inner Join In SQL by Manish Sharma/RebellionRider
Manish Sharma
37 SQL tutorial 31 : SQL Cross Join In Oracle Database By Manish Sharma from RebellionRider
SQL tutorial 31 : SQL Cross Join In Oracle Database By Manish Sharma from RebellionRider
Manish Sharma
38 SQL tutorial 32: How To Insert Data into a Table Using SQL Developer
SQL tutorial 32: How To Insert Data into a Table Using SQL Developer
Manish Sharma
39 SQL tutorial 33:How To Insert Data into a Table Using SQL INSERT INTO dml statement
SQL tutorial 33:How To Insert Data into a Table Using SQL INSERT INTO dml statement
Manish Sharma
40 SQL tutorial 34: How to copy /Insert data into a table from another table using INSERT INTO SELECT
SQL tutorial 34: How to copy /Insert data into a table from another table using INSERT INTO SELECT
Manish Sharma
41 SQL tutorial 35: DELETE and TRUNCATE how to delete data from a table
SQL tutorial 35: DELETE and TRUNCATE how to delete data from a table
Manish Sharma
42 SQL tutorial 36: how to create database using database configuration assistant DBCA
SQL tutorial 36: how to create database using database configuration assistant DBCA
Manish Sharma
43 SQL tutorial 37: How to create NEW USER account using Create User statement in Oracle database
SQL tutorial 37: How to create NEW USER account using Create User statement in Oracle database
Manish Sharma
44 SQL tutorial 38: How to create user using SQL Developer in Oracle database
SQL tutorial 38: How to create user using SQL Developer in Oracle database
Manish Sharma
45 SQL tutorial 39: How to create user in oracle using Enterprise Manager
SQL tutorial 39: How to create user in oracle using Enterprise Manager
Manish Sharma
46 SQL tutorial 40: DBA Trick, How to drop a user when it is connected to the database
SQL tutorial 40: DBA Trick, How to drop a user when it is connected to the database
Manish Sharma
47 Motorola Moto G 2nd Generation / G2 Unboxing and Review
Motorola Moto G 2nd Generation / G2 Unboxing and Review
Manish Sharma
48 SQL tutorial 41: How to UNLOCK USER in oracle Database
SQL tutorial 41: How to UNLOCK USER in oracle Database
Manish Sharma
49 SQL tutorial 42: How to Unlock user using SQL Developer By Manish Sharma RebellionRider
SQL tutorial 42: How to Unlock user using SQL Developer By Manish Sharma RebellionRider
Manish Sharma
50 SQL tutorial 43: How to create an EXTERNAL USER in oracle database By Manish Sharma RebellionRider
SQL tutorial 43: How to create an EXTERNAL USER in oracle database By Manish Sharma RebellionRider
Manish Sharma
51 SQL tutorial 44: How to import data from Microsoft Excel to Oracle Database using SQL Developer
SQL tutorial 44: How to import data from Microsoft Excel to Oracle Database using SQL Developer
Manish Sharma
52 SQL tutorial 45: Introduction to user Privileges in Oracle Database By Manish Sharma RebellionRider
SQL tutorial 45: Introduction to user Privileges in Oracle Database By Manish Sharma RebellionRider
Manish Sharma
53 SQL tutorial 46: What are System Privileges & How To Grant them using Data Control Language
SQL tutorial 46: What are System Privileges & How To Grant them using Data Control Language
Manish Sharma
54 SQL tutorial 47: How to Grant Object Privileges With Grant Option in Oracle Database
SQL tutorial 47: How to Grant Object Privileges With Grant Option in Oracle Database
Manish Sharma
55 SQL tutorial 48: How to create Roles in Oracle Database
SQL tutorial 48: How to create Roles in Oracle Database
Manish Sharma
56 SQL tutorial 49: CASE - Simple Case Expression in Oracle Database (1/2)
SQL tutorial 49: CASE - Simple Case Expression in Oracle Database (1/2)
Manish Sharma
57 SQL tutorial 50: CASE - Searched Case Expression In Oracle (2/2)
SQL tutorial 50: CASE - Searched Case Expression In Oracle (2/2)
Manish Sharma
58 SQL tutorial 51: DECODE function in Oracle Database By Manish Sharma (RebellionRider)
SQL tutorial 51: DECODE function in Oracle Database By Manish Sharma (RebellionRider)
Manish Sharma
59 Oracle Database Tutorial 52 : Data Pump expdp - How to Export full database using expdp
Oracle Database Tutorial 52 : Data Pump expdp - How to Export full database using expdp
Manish Sharma
60 Oracle Database Tutorial 53 : Data pump expdp - How to Export tablespace in Oracle Database
Oracle Database Tutorial 53 : Data pump expdp - How to Export tablespace in Oracle Database
Manish Sharma

Related Reads

📰
Building a Telegram AI Agent for Personal Use
Build a personal Telegram AI agent with conversation memory and security features using Bun, Telegraf, SQLite, and Composio
Dev.to · Shubham
📰
Terence Tao Is Vibe Coding Now — A Fields Medalist Ports His 1999 Applets With AI Agents
Learn how Terence Tao, a Fields Medalist, uses AI agents to port his 1999 applets, and discover the potential of vibe coding in mathematics
Dev.to · TerminalBlog
📰
🚀 Calling all DevOps, SRE, and Platform Engineers! Let’s build the future of AI for DevOps together.
Learn how AI agents can revolutionize DevOps and how you can contribute to building the future of AI for DevOps
Dev.to · Prashant Lakhera
📰
Calling all DevOps, SRE, and Platform Engineers!
Learn how to build AI for DevOps and improve production infrastructure with specialized AI agents
Medium · LLM
Up next
Building the future of agentic infrastructure
Claude
Watch →