Common Keywords

Write a SQL query that returns all columns from a table called “Employee”, sorted by a column called “LastName”:

  1. SELECT * FROM Employee ORDER BY LastName
  2. SELECT * FROM Employee ORDER BY LastName ASC
  3. SELECT * FROM Employee ORDER BY LastName DESC
    1. Any of the above are correct

Write a SQL query that returns only unique values from a column called “FirstName” in a table called “Employee”:

SELECT DISTINCT FirstName FROM Employee

Using the keyword “IN”, write a SQL query that returns all columns from a table called “Employee” where the column called “LastName” is any of the following values: Smith, Thompson, Andrews, O’Brien

SELECT * FROM Employee WHERE LastName IN (‘Smith’, ‘Thompson’, ‘Andrews’, ‘O”Brien’)

Instructions: 

  1. Click the play button to watch the video lesson.
  2. Watch the lesson as many times as needed.
  3. Code along with the instructor using the integrated code editor in the center of your screen.
  4. You can use the Run button beneath the code editor to test your code.
  5. Output from the code that you have written will appear in the panel on the right side of your screen.

If you get stuck or need assistance, you can click the button below to connect with a tutor. 

For additional questions or technical support, email support@veroskills.com