Which comparison operator means 'not equal to' in SQL?
<>
!=
<
=
What SQL clause is used to filter rows in a result set based on specific conditions?
ORDER BY
WHERE
FROM
SELECT
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
HAVING
To modify existing data in a table, which SQL statement would you use?
CHANGE
UPDATE
ALTER
MODIFY
What is the key difference between the IN and EXISTS operators when used with subqueries?
IN compares values, while EXISTS checks for the presence of rows.
There is no difference; they are interchangeable.
IN checks for existence in a list, while EXISTS checks for existence in a table.
IN is used for single values, while EXISTS is used for multiple values.
Which SQL function would you use to combine the first and last names from two different columns into a single column?
COMBINE()
CONCAT()
JOIN()
MERGE()
By default, how does the 'ORDER BY' clause sort data?
Randomly
Alphabetically
In descending order
In ascending order
What is the primary clause used to retrieve data from a table in SQL?
FETCH
GET
RETRIEVE
What does the asterisk (*) symbol represent when used in a SELECT statement?
A specific column name
All columns
A wildcard for searching data
A comment indicator
In which scenario would a subquery be a more suitable choice than a JOIN operation?
When you need to combine data from multiple tables based on a common column.
When you need to sort data from multiple tables based on a common column.
When you need to update data in one table based on data from another table.
When you need to filter data based on a condition that involves a separate query.