Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Write a query that will retrieve the first name and last name columns from the table tblStaff. Ensure first
name is displayed first in your results.
Below is the design of tblStaff table.
tblStaff
ID_Staff
FirstName
LastName
The answer is not case sensitive
Ensure you have one space after any ',' comma's
Ensure no spaces are before any ',' comma's
Question 1 options:
Question 2 (1 point)
Write a query that will retrieve the all of the columns from the table tblStaff. You must use wild cards.
Ensure you sort your results in order of last name then first name. The last name must be in descending
order.
Below is the design of tblStaff table.
tblStaff
ID_Staff
FirstName
LastName
The answer is not case sensitive
Ensure you have one space after any ',' comma's
Ensure no spaces are before any ',' comma's
Question 2 options:
Question 3 (1 point)
Question 3 options:
Question 4 (1 point)
Question 4 options:
Question 5 (1 point)
Question 5 options:
Complete the following SQL Statement so that tblStaff and tblDepartments are Joined together using
ID_Dept which exists in both tables as the relationship.
SELECT *
FROM tblStaff
Question 7 (1 point)
Question 7 options:
Fill in the blanks to define the following aliases and complete the SQL statement.
From the table products, the unit price alias must be ProdPrice
From the table order details the unit price must be OrderPrice
You may use either of the two methods.
SELECT Products.UnitPrice
.UnitPrice
Save
Question 1 (1 point)
Question 1 options:
Fill in the blanks to complete the select statement that will return records where the first first name starts
with an "E".
SELECT * FROM tblStaff WHERE StaffName
Question 2 (1 point)
Question 2 options:
Fill in the blanks to complete the SQL statement to return staff names that contain an e or and i.
Make sure your first condition is for names that contain an e, your second condition is for names that
contain an i.
SELECT * FROM tblStaff WHERE StaffName
StaffName
Question 3 (1 point)
Question 3 options:
Write a SQL statement that will add Ryan Ginger who is CEO to the following table.
tblStaff
ID_Staff
FirstName
varchar(50)
Surname
varchar(50)
Title
varchar(50)
Formatting rules:
Ensure you specify your values in order of this table. Auto grading will not catch values set in any
other order.
Leave a single space before and after any '='
Leave a single space after any ',' but not before.
Spelling counts.
Question 4 (1 point)
Write a SQL Statement that will change Bill Smith's name to Will Smith. Use good practice when doing so.
tblStaff
ID_Staff
StaffName
1
George Brown
Bill Smith
Sammy Joe
Ryan Ginger
Formatting rules:
1.
2.
3.
Spelling counts.
Question 4 options:
Question 5 (1 point)
Your staff office have relocated, write a SQL statement that will update everyone's office from Toronto to
London.
tblLocation
ID_Location
ID_Staff
Province
City
ON
TORONTO
ON
TORONTO
ON
Edmonton
ON
TORONTO
ON
Oakville
Formatting rules:
1.
2.
3.
Spelling counts.
Question 5 options:
Question 6 (1 point)
Write a SQL statement that will remove George Smith from the table below. Use good practice when doing
so.
tblStaff
ID_Staff
StaffName
Bob Henderson
Ryan Ginger
Sharon Stone
George Smith
Tony Tiger
Formatting rules:
1.
2.
3.
Spelling counts.
Question 6 options: