![]() So, we have used the where clause to get the records for that use, as the where clause filters out the rows or takes the rows that we want. Now, as we have all the customers with their orders we will find some null CustomerId in the order table who haven’t ordered anything yet. The left join was performed on the Customer table because we want all the Customers with their Orders. Note: A left join takes all the values from the left table and only the common rows from the right table. ![]() At first, we used the left join to join the Orders table with the Customers table. We want to get the name of the customers who haven’t ordered anything yet. ![]() All customers might order a product or not. Solution Framework: In this problem, we have two tables with customer details and another with orders. By the right use of these two, we can easily get the final result. Solution Overview: So, to solve the problem we need to use LEFT JOIN, WHERE clause.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |