iGET

Database (DBMS) - MCQ Practice Questions

DBMS & SQL MCQs — normalization, joins, transactions & indexing.

57 questions | 100% Free

Q.21Easy

In SQL, which clause is used to filter groups based on aggregate function results?

Q.22Easy

Which data type in SQL is used to store large text documents or binary data?

Q.23Easy

What is the purpose of the DISTINCT keyword in SQL?

Q.24Easy

Which SQL JOIN returns only matching rows from both tables?

Q.25Easy

What will be the result of: SELECT 10 % 3; in SQL?

Q.26Medium

Which aggregate function ignores NULL values by default?

Q.27Medium

Given a table 'employees' with salary column, which query finds employees earning more than average salary?

Q.28Medium

What is the difference between CROSS JOIN and INNER JOIN?

Q.29Medium

Which statement correctly uses aliases in SQL?

Q.30Medium

For a query with transactions table, which index type is most efficient for WHERE clauses checking transaction_date range?

Q.31Medium

What is the output of: SELECT COALESCE(NULL, NULL, 'SQL', 'Database');?

Q.32Medium

In a normalized database following 3NF, which anomaly is prevented?

Q.33Medium

Which of the following queries demonstrates a self-join correctly?

Q.34Hard

What will be the result of: SELECT COUNT(DISTINCT department) FROM employees WHERE salary > 50000;?

Q.35Hard

For optimizing a query with multiple JOINs and subqueries, which approach is most effective for 2024 databases?

Q.36Hard

Which scenario requires using PARTITION BY in window functions instead of GROUP BY?

Q.37Hard

A table has 1M rows. Query A uses WHERE on non-indexed column, Query B uses indexed column in WHERE. Expected performance difference?

Q.38Easy

What is the result of: SELECT CASE WHEN 1=1 THEN 'A' WHEN 2=2 THEN 'B' ELSE 'C' END;?

Q.39Hard

In concurrent transaction scenarios, which isolation level allows dirty reads?

Q.40Easy

Which SQL command is used to remove all records from a table without removing the table structure?