A Guide to SQL
A Guide to SQL
9th Edition
ISBN: 9781111527273
Author: Philip J. Pratt
Publisher: Course Technology Ptr
Question
Book Icon
Chapter 5, Problem 16CAT
Program Plan Intro

LEFT JOIN:

  • This type of join returns all the records (rows) from the left table and the matched records (rows) from the right table.
  • When the fields of right table do not match with the left one, then the fields are filled with “NULL” values.

Syntax:

SELECT column_Name(s) FROM table_Name1 RIGHT JOIN table_Name2 ON table_Name1.column_Name = table_Name2.column_Name;

In the above syntax, the left table is “table_Name1” and the right table is “table_Name2”.

ORDER BY Clause:

SQL contains “ORDER BY” clause in order to sort rows. The values get sorted in ascending as well as descending order. The keyword used to sort values in ascending order is “ASC” and for descending order is “DESC”. By default, it sorts values by ascending order.

Syntax:

SELECT column_Name1, column_Name2 FROM table_Name ORDER BY column_Name2;

Blurred answer
Students have asked these similar questions
Please read the instrucitons before posting an answer that someone else has already posted. GROUP_CONCAT is not permitted.
Orders Table: OrderID, CustomerID, Order Date, TotalAmount Customers Table: CustomerID,CustomerName. Retrieve the customer name and order date for each order placed by customers who have made more than two orders.
WEEK 9 ASSIGNMENT#6   Part II: Complete the following exercise:    Using a subquery, select student first name where the student is in the student course table. Using a subquery, select the course id where the average GPA is 2. Using a subquery, select the course id where the average GPA is greater than 2. Using a subquery, select student first name where the student is not in the student course t
Knowledge Booster
Background pattern image
Similar questions
Recommended textbooks for you
Text book image
A Guide to SQL
Computer Science
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Course Technology Ptr
Text book image
Oracle 12c: SQL
Computer Science
ISBN:9781305251038
Author:Joan Casteel
Publisher:Cengage Learning
Text book image
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage
Text book image
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:9780357392676
Author:FREUND, Steven
Publisher:CENGAGE L