Skill Zuno · skillzunos.com · Fullstack
MySQL interview questions
Prepare for MySQL interviews on Skill Zuno. This practice book covers MySQL interview questions across New, Easy, Medium, Hard, and Diff levels so you can work through real interview-style problems on skillzunos.com.
Open MySQL on Skill ZunoAlso see the MySQL tutorial.
MySQL is one of the most popular open-source relational databases and the default storage for many web applications. Its InnoDB engine provides ACID transactions, row-level locking and clustered primary keys. MySQL interviews cover SQL, indexing, EXPLAIN, transactions and isolation levels, locking, replication and performance tuning.
Sample MySQL interview questions
What is a clustered index in InnoDB?
InnoDB stores table rows in the leaf pages of the primary key's B-tree, so the primary key is the clustered index. Secondary indexes store the primary key value and look the row up through it, which is why a short primary key keeps every index small.
What is MySQL's default isolation level?
InnoDB defaults to REPEATABLE READ. Plain SELECTs read a consistent snapshot from MVCC, and locking reads use next-key locks to prevent phantom rows.
What is a covering index?
An index that contains every column a query needs, so MySQL answers from the index alone without reading the table rows. EXPLAIN shows 'Using index' in the Extra column.
What is the leftmost prefix rule?
A composite index on (a, b, c) can serve queries filtering on a, on a and b, or on a, b and c, but not on b or c alone, because the B-tree is sorted by a first.
What is the difference between WHERE and HAVING?
WHERE filters rows before grouping and cannot use aggregate functions. HAVING filters groups after GROUP BY, so it can test aggregates such as HAVING COUNT(*) > 5.
What you can practice
- MySQL interview questions for beginners and experienced developers
- Level-based practice: New, Easy, Medium, Hard, and Diff
- Fullstack topics alongside MySQL on skillzunos.com