What potential issue should be considered when using correlated subqueries?
They cannot return more than one column.
They cannot be used with aggregate functions.
They require the use of the JOIN clause.
They can lead to performance issues if not used carefully.
What is the primary clause used to retrieve data from a table in SQL?
GET
SELECT
FETCH
RETRIEVE
How would you convert the text 'hello world' to uppercase in SQL?
TO_UPPER('hello world')
MAKE_UPPER('hello world')
UCASE('hello world')
UPPER('hello world')
You want to find customers who have placed orders in the last month. You have two tables: 'Customers' and 'Orders'. Which subquery type would be most efficient to achieve this?
Any of the above would be equally efficient.
Correlated Subquery
EXISTS Subquery
IN Subquery
What type of join returns all rows from both tables, regardless of whether there is a match?
FULL OUTER JOIN
RIGHT JOIN
INNER JOIN
LEFT JOIN
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?
HAVING
LIMIT
ORDER BY
WHERE
What is the result of SELECT NOW(); in SQL?
SELECT NOW();
Current date and time
An error message
Current date
Current time
What SQL clause is used to filter rows in a result set based on specific conditions?
FROM
In which scenario would a subquery be a more suitable choice than a JOIN operation?
When you need to filter data based on a condition that involves a separate query.
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.
To modify existing data in a table, which SQL statement would you use?
MODIFY
UPDATE
CHANGE
ALTER