Orders
--This is how you select from a table name with spaces in the name
--This works in both Access and SQL Server
ORDERS
--Examples of Table Alias's
List all the orders and the total amount of each product ordered
List all the customers and their orders
This displays a list of customers and the total amount they have ordered
List all the customers and the size of their average order
This is the same as the following
List all the employees and their total sales
PRODUCTS
--This works in both SQL Server and Access
--This works in both SQL Server and Access
--This works in both SQL Server and Access
--This works in both SQL Server and Access
--This only works in SQL Server becuase there is no SUBSTRING function in Access
-- not case sensitive
This works in both SQL Server and Access (although dates are not formatted very well)
REGION
--This table does not exist in Access
SHIPPERS
SUPPLIERS
TERRITORIES
--This table does not exist in Access
--RAND() returns a random number between 0 and 1
© 2026 Better Solutions Limited. All Rights Reserved. © 2026 Better Solutions Limited TopPrevNext