Total Page Preview:   000000000352

What is full outer join in SQL in English and Hindi

 

Full outer join in SQL in English

In SQL, a full outer join is used to combine the result sets of two tables, including all the records from both tables, and matching records where possible.

Here is an example of a full outer join in SQL:
Suppose we have two tables, "customers" and "orders". The "customers" table contains information about the customers, including their ID and name. The "orders" table contains information about the orders placed by the customers, including the order ID, customer ID, and order date.
Customers Table:
Orders Table:
To perform a full outer join on these tables, we would use the following SQL statement:\
The result set of this SQL statement would be:
As you can see, the result set includes all the records from both tables, and matching records where possible. If a customer does not have any orders, or an order does not have a corresponding customer, NULL values are used for the non-matching columns.

 

 

 

Full outer join in SQL in Hindi

"Full outer join" ek SQL ka join prakar hai jiske dwara hum multiple tables ko combine kar sakte hai. Full outer join, inner join aur left/right outer join ka combination hota hai, jiske dwara hum dono tables ke common aur uncommon records ko display kar sakte hai.

Full outer join ka use karke hum dono tables ke saare records ko display kar sakte hai, aur agar koi record dusre table se match nahi karta hai to uski jagah NULL value display hota hai.
Full outer join example:
Consider karein ki humare pass 2 tables hai: "students" aur "courses". Har student ek course ko attend karta hai. Hum full outer join ka use karke students aur courses table ko combine kar sakte hai, taki hume har student aur har course ka details mil jaye, saath hi saath agar koi student koi course attend nahi karta hai to uska bhi detail mil jaye.
students table:
courses table:
Full outer join syntax:
Full outer join result:
 
Is example mai humne full outer join ka use kiya hai, jiske dwara hume dono tables ke saare records mil gaye hai. Kuch records students table se match kiye hue hai, kuch courses table se match kiye hue hai, aur kuch records dono tables se match nahi hue hai.
 
 
 
 
 

Thank You

About Author

Brijesh Kumar

Database Developer

I have more then 6 years Experience in Microsoft Technologies - SQL Server Database, ETL Azure Cloud - Azure SQL Database, CosmosDB, Azure Data Factory, PowerBI, Web Job, Azure Function, Azure Storage, Web Apps, Powershall and Database Migration On-Premise to Azure Cloud.
LinkedIn : https://www.linkedin.com



Comments


                           
                           

                           

                           

Facebook User: