21.) What is the purpose of the UNION operator?
A) Combines results of two queries
B) Joins tables
C) Filters duplicate rows
D) Deletes records
22.) Which SQL command removes a table from the database?
A) DELETE
B) TRUNCATE
C) DROP
D) REMOVE
23.) What does the LIKE operator do?
A) Matches a pattern in a string
B) Sorts data
C) Joins tables
D) Deletes records
24.) Which aggregate function calculates the sum of a column?
A) MAX()
B) AVG()
C) COUNT()
D) SUM()
25.) What is a subquery?
A) A temporary table
B) A type of join
C) A query within another query
D) None of the above
26.) What is the maximum number of primary keys a table can have?
A) 1
B) 2
C) Unlimited
D) None
27.) Which function returns the current date in SQL?
A) GETDATE()
B) CURDATE()
C) NOW()
D) All of the above
28.) What does the HAVING clause do?
A) Filters grouped data
B) Joins tables
C) Deletes grouped data
D) None of the above
29.) Which SQL clause is used to set a condition on aggregated data?
A) WHERE
B) HAVING
C) GROUP BY
D) FILTER
30.) What is a database index?
A) A pointer to data in a table
B) A duplicate of a table
C) A key for foreign table linking
D) None of the above
Related