1. Which comparison operator is used to check for one value being greater than the other value?
✔ >
<>
==
2. What does the following SQL query do?
SELECT * FROM employees WHERE age > 30;
Selects all rows from the “employees” table
Selects all rows where the “age” column is less than 30
✔ Selects all rows where the “age” column is greater than 30
3. Which of the following SQL statements will return rows sorted by the “age” column in descending order?
✔ SELECT * FROM employees ORDER BY age DESC;
SELECT * FROM employees ORDER BY age ASC;
SELECT * FROM employees ORDER BY age;
4. How can you use the LIMIT clause to retrieve only the top 10 rows from a table?
✔ SELECT * FROM employees LIMIT 10;
SELECT * FROM employees WHERE LIMIT = 10;
SELECT * FROM employees ORDER BY 10;
Leave a comment