What SQL keyword is used to retrieve data from a database?
What is "SELECT"?
What clause is used to sort results in SQL?
What is "ORDER BY"?
What does NULL represent in SQL?
What is "An unknown or missing value"?
What SQL statement is used to create a new table?
What is "CREATE NEW TABLE"?
Identify the error in the query:
SELECT * FROM employees
WHERE salary > 50000 AND;
What is "The AND operator is used but no condition follows it. Every AND must connect two conditions"
What clause do you use to filter records returned by a SELECT statement?
What is "WHERE"?
How do you sort results in descending order?
What is "ORDER BY column_name DESC"?
How do you check for NULL values in a column?
What is "By using IS NULL or IS NOT NULL"?
What command do you use to add a new column to an existing table?
What is "ALTER TABLE...ADD"
Identify the error in the query:
SELECT * FROM sales
WHERE (region = 'West' AND) (amount > 1000);
What is "No operator (like AND or OR) connecting the two parentheses groups properly"
What is the default order of records returned in a SELECT query if no ORDER BY is used?
What is no specific order?
What operator would you use to filter for values between two numbers?
What is "BETWEEN"?
By inputing this command, what information would you be requesting?
SELECT *
FROM customers
WHERE email IS NULL;
What is customers emails that are either unknown or missing?
True or False: You can rename a column directly in all SQL databases using the same ALTER TABLE syntax.
What is False
Explanation: The syntax for renaming a column varies between SQL databases, and some do not support direct renaming.
Identify the error in the query:
SELECT department_id, COUNT(employee_id)
FROM employees;
What is "Mixing aggregated and non-aggregated columns without GROUP BY"