/****************************************************** * This script shows how to write more complicate * SELECT statement that retrieve information from * more than one table ******************************************************/ /* retrieve an order information */ SELECT Orders.OrderId, Customers.ContactName, Customers.CompanyName, Orders.TotalCost FROM Orders JOIN Customers ON ( Orders.CustomerId = Customers.CustomerId ) ; /* retrieve the order details */ SELECT Products.ProductName, Products.Price, OrderDetails.Quatity /* OrderDetails.Quatity * Products.Price AS ItemTotalCost **/ FROM OrderDetails JOIN Products ON ( OrderDetails.ProductId = Products.ProductId ) ;