In a SQL query, what does the logical operator 'AND' do?
It sorts the results in descending order.
It negates a condition.
It combines two conditions, and both conditions must be true for the row to be included.
It combines two conditions, and at least one condition must be true for the row to be included.
What is the purpose of the 'LIMIT' clause in SQL?
It groups rows with the same values.
It filters rows based on a condition.
It sorts the result set.
It restricts the number of rows returned by the query.
Which of the following is NOT a valid SQL data type?
INTEGER
FLOAT
VARCHAR
BOOLEAN
To modify existing data in a table, which SQL statement would you use?
MODIFY
UPDATE
CHANGE
ALTER
Which type of subquery is used to check if a value exists in a list of values returned by another query?
Correlated Subquery
EXISTS Subquery
IN Subquery
Nested Subquery
What does the asterisk (*) symbol represent when used in a SELECT statement?
A comment indicator
A wildcard for searching data
A specific column name
All columns
Which SQL statement is used to remove rows from a table?
DELETE
REMOVE
TRUNCATE
DROP
You want to select the department with the highest average salary. What SQL clause would you use to filter the grouped results based on the calculated average salary?
LIMIT
WHERE
ORDER BY
HAVING
What is the purpose of the 'OR' operator in a SQL WHERE clause?
It selects rows where at least one condition is true.
It limits the number of rows returned.
It selects rows where both conditions are true.
What potential issue should be considered when using correlated subqueries?
They can lead to performance issues if not used carefully.
They cannot return more than one column.
They require the use of the JOIN clause.
They cannot be used with aggregate functions.