Write the SQL code for the following: Display the last names of the customers who have registered
Question:
Write the SQL code for the following: Display the last names of the customers who have registered for a class on 1/2/2021.
a. SELECT Customers.LastName, Reservations.ClassDate FROM Customers ADD Customers.CustomerID = Reservations.CustomerID AND Reservations.ClassDate ='1/2/2021';
b. SELECT Customers.LastName, Reservations.ClassDate FROM Customers, Reservations WHERE Customers.CustomerID = Reservations.CustomerID AND Reservations.ClassDate =#1/2/2021#;
c. SELECT Customers.LastName, Reservations.ClassDate FROM Customers, Reservations WHERE Customers.CustomerID = Reservations.CustomerID WITH Reservations.ClassDate =#1/2/2021#;
d. SELECT Customers.LastName, Reservations.ClassDate FROM Customers, Reservations WHERE Customers.CustomerID = Reservations.CustomerID INCLUDE Reservations.ClassDate =#1/2/2021#;
Step by Step Answer:
Concepts Of Database Management
ISBN: 9780357422083
10th Edition
Authors: Lisa Friedrichsen, Lisa Ruffolo, Ellen Monk, Joy L. Starks, Philip J. Pratt