I am trying out SQL queries and wondering how to use the join between two tables (Customers and Orders) to display last name, first name and corresponding Cust_orderNo for all records.
Table_a Customers Table_b Orders
C_ID CustLastName CustFirstName Order_ID Cust_orderNo C_ID
1 Ant Adam 1 123 1
2 Bear Brent 2 456 6
3 Cat Cathy 3 789 6
Here is what I have:
Select Customers.CustLastName, Customers.CustFirstName
FROM Customers a JOIN Orders Cust_orderNo
Also, if there were thousands of records, what is the most efficient syntax to use for this problem?