SQL MCQ Questions
SQL MCQ Questions are an essential resource for anyone looking to sharpen their database management skills. Covering a broad range of topics from basic SQL commands like SELECT, INSERT, and UPDATE to advanced concepts such as joins, subqueries, and normalization, these multiple-choice questions help learners at all levels improve their SQL knowledge. Whether you're preparing for exams, interviews, or just want to test your understanding, these MCQs will help you master SQL and boost your confidence in database management.
Q1. Which SQL command is used to retrieve data from a database?
A. INSERT
B. SELECT
C. UPDATE
D. DELETE
📘 View Explanation
Q2. Which SQL command is used to add new records to a table?
A. INSERT
B. SELECT
C. UPDATE
D. DELETE
📘 View Explanation
Q3. Which SQL command is used to modify existing records?
A. UPDATE
B. SELECT
C. DELETE
D. INSERT
📘 View Explanation
Q4. Which SQL command is used to remove records from a table?
A. DELETE
B. DROP
C. TRUNCATE
D. UPDATE
📘 View Explanation
Q5. Which clause is used to filter results in SQL?
A. WHERE
B. FROM
C. ORDER BY
D. GROUP BY
📘 View Explanation
Q6. Which SQL keyword is used to sort query results?
A. SORT
B. GROUP BY
C. ORDER BY
D. FILTER
📘 View Explanation
Q7. Which function counts the number of rows in a table?
A. SUM()
B. COUNT()
C. AVG()
D. MAX()
📘 View Explanation
Q8. Which SQL keyword is used to combine rows from two or more tables?
A. JOIN
B. MERGE
C. UNION
D. COMBINE
📘 View Explanation
Q9. Which SQL command removes a table and its data permanently?
A. DROP
B. DELETE
C. TRUNCATE
D. REMOVE
📘 View Explanation
Q10. Which SQL command quickly deletes all rows but keeps the table structure?
A. DROP
B. DELETE
C. TRUNCATE
D. REMOVE
📘 View Explanation
Q11. Which SQL keyword groups rows sharing a property?
A. GROUP BY
B. ORDER BY
C. HAVING
D. WHERE
📘 View Explanation
Q12. Which clause filters groups created by GROUP BY?
A. WHERE
B. HAVING
C. ORDER BY
D. GROUP BY
📘 View Explanation
Q13. Which SQL data type is used for textual data?
A. INT
B. VARCHAR
C. DATE
D. BOOLEAN
📘 View Explanation
Q14. Which SQL data type is used for true/false values?
A. BOOLEAN
B. INT
C. CHAR
D. DATE
📘 View Explanation
Q15. Which keyword eliminates duplicate rows in a SELECT query?
A. DISTINCT
B. UNIQUE
C. ONLY
D. NONE
📘 View Explanation
Q16. Which SQL function calculates the average value of a numeric column?
A. SUM()
B. AVG()
C. MIN()
D. MAX()
📘 View Explanation
Q17. Which clause specifies the table to query in SQL?
A. FROM
B. WHERE
C. SELECT
D. JOIN
📘 View Explanation
Q18. Which operator is used to match a pattern in SQL?
A. MATCH
B. LIKE
C. PATTERN
D. SIMILAR
📘 View Explanation
Q19. Which SQL keyword combines results of two SELECT queries?
A. UNION
B. JOIN
C. MERGE
D. INTERSECT
📘 View Explanation
Q20. Which function finds the maximum value in a column?
A. MAX()
B. MIN()
C. AVG()
D. SUM()
📘 View Explanation