CIS 336 STUDY Great Stories/cis336study.com CIS 336 STUDY Great Stories/cis336study.com | Page 64
Select unit_price as “Retail Price “ from items; –this does NOT work
in EDUPE MySQL.
Any of the following WILL WORK:
Select unit_price as “RetailPrice” from items;
Select unit_price as “Retail_Price” from items;
Select unit_price as Retail_Price from items;
Select unit_price as RetailPrice from items;
**Any calculated fields MUST be given an alias (and note above NO
SPACES in alias). For example:
select unit_price * 2 from items; –this does NOT work in EDUPE
MySQL
This will work:
select unit_price * 2 as NewPrice from items;
Deliverables
• Lab Report (Answer Sheet) containing both the student-created SQL
command(s) for each exercise, and the output showing the results
obtained. Be sure your name is on the file.
LAB STEPS: Complete each of the exercises below.
1. Write a query that displays a list of all customers showing the
customer first name, last name, and phone number. Sort the results by
customer last name, then first name.
2. Write a query that displays each customer name as a single field in
the format “firstnamelastname” with a heading of Customer, along
with their phone number with a heading of Phone. Use the IN