Skip to main content

MySQL Interview Cheat Sheet

Top 50 interview questions with concise answers. Print this page or save as PDF for offline study.

View All MySQL Questions

1. What is MySQL?

2. What is a database table?

3. What is a primary key?

4. What is a foreign key?

5. What is SQL?

6. What are the different types of SQL commands?

7. What is a constraint in MySQL?

8. What is the difference between CHAR and VARCHAR?

9. What is the purpose of the SELECT statement?

10. What is a WHERE clause used for?

11. What is ORDER BY used for?

12. What is LIMIT in MySQL?

13. What is a JOIN?

14. What is an index in MySQL?

15. What is NULL in MySQL?

16. Difference between DELETE and TRUNCATE?

17. What does AUTO_INCREMENT do?

18. What is a default value in MySQL?

19. What is the purpose of GROUP BY?

20. What is an aggregate function?

21. How does MySQL’s InnoDB storage engine manage transactions internally?

22. What is MVCC (Multi-Version Concurrency Control) in MySQL?

23. What is the purpose of the InnoDB buffer pool?

24. What is a covering index?

25. What is an execution plan and why is EXPLAIN important?

26. What is the difference between row-level and table-level locking?

27. How does MySQL handle indexing on large tables?

28. What is a slow query log and when should you enable it?

29. What is the difference between logical and physical backups?

30. What is a stored routine and why use it?

31. How does MySQL handle foreign key constraints during deletes or updates?

32. What is partitioning and when is it useful?

33. What are FULLTEXT indexes and when are they used?

34. What is a deadlock detector in InnoDB?

35. How do prepared statements improve performance and security?

36. What are triggers and their performance implications?

37. What is the difference between CHAR, VARCHAR, and TEXT in performance?

38. How do you optimize JOIN performance in MySQL?

39. How does MySQL handle replication?

40. What are common reasons for slow MySQL performance?

41. What is the difference between INNER JOIN and LEFT JOIN?

42. What is a composite primary key?

43. What is the use of the DISTINCT keyword?

44. What is an alias in MySQL?

45. What is the purpose of HAVING clause?

46. What is the difference between UNION and UNION ALL?

47. What is a subquery?

48. What is a self join?

49. What are MySQL data types?

50. What is a view?

Ready to level up? Start Practice