90 likes | 202 Views
This presentation on Joins in SQL will help you understand the different types of joins with hands-on demonstrations on MySQL Workbench. You will learn Joins in SQL with examples about Inner join, Left join, Right join, Self join, and Full outer join. Let's get started with SQL joins.<br><br>Following are the topics that you will learn in this presentation:<br>1. What are Joins in SQL?<br>2. Inner Join in SQL<br>3. Left Join in SQL<br>4. Right Join in SQL<br>5. Full Join in SQL
E N D
What are Joins in SQL? B A SQL JOIN statement is used to combine rows of data from two or more tables based on a common column (field) between them
What are Joins in SQL? Orders Customers • OrderId • OrderDate • ShippedDate • ProductName • StatusOfDelivery • Quantity • PriceOfProduct • OrderId • CustomerId • PhoneNumber • CustomerName • Address Find the phone numbers of customers who have ordered a Laptop? Find the customer names who have ordered a product in the last 30 days?
Inner Join in SQL A B SQL INNER JOIN statement returns all the rows from multiple tables as long as the conditions are met Select <field list> from Table A inner join Table B on A.key = B.key
Left Join in SQL A B SQL LEFT JOIN statement returns all the rows from the left table and matching rows from the right table Select <field list> from Table A left join Table B on A.key = B.key
Right Join in SQL A B SQL RIGHT JOIN statement returns all the rows from the right table and matching rows from the left table Select <field list> from Table A right join Table B on A.key = B.key
Full Join in SQL A B SQL FULL OUTER JOIN statement returns all the rows when there is a match in either left or right table Select <field list> from Table A full outer join Table B on A.key = B.key
1 VB. NET Reasons For Decline: • The language is seen to be bulky and clumsy • Work nowadays usually involves maintaining legacy applications or migrating to C# • Capabilities are limited to the Windows platform • Harsh declaration syntax and requirements, a rigid development environment and a lack of libraries