FullStackFSCCafé
 
 
Sign in with GoogleSign in with Google. Opens in new tab
Kill Your Tech Interview
3877 Full-Stack, Algorithms & System Design Interview Questions
Answered To Get Your Next Six-Figure Job Offer
      
🤖 Having Machine Learning & DS Interview? Check  MLStack.Cafe - 1704 Data Science & ML Interview Questions & Answers!Having ML & DS Interview? Check 🤖 MLStack.Cafe - 1704 ML & DS Interview Questions and Answers

Top 61 MySQL Interview Questions

Entry Junior Mid Senior Expert
Sign in with GoogleSign in with Google. Opens in new tab
Topic Progress:

Theoretical Questions

Q1:   

What is a VIEW in MySQL. How can you create and query a view?

  
Add to PDF   Junior 
Q2:   

What is the difference between Data Definition Language (DDL) and Data Manipulation Language (DML)?

  Related To: SQL, T-SQL, Databases
Add to PDF   Junior 
Q3:   

What is the difference between TRUNCATE and DELETE?

  Related To: SQL
Add to PDF   Junior 
Q4:   

What is an AGGREGATE function. Name few aggregate functions used in MySQL.

  
Add to PDF   Junior 
Q5:   

Describe BLOB in MySQL. What is it used for?

  
Add to PDF   Junior 
Q6:   

How are VARCHAR and CHAR different. Talk about cases where you will use one over other.

  
Add to PDF   Junior 
Q7:   

What is Primary Key Constraint and Unique Key Constraints?

  
Add to PDF   Junior 
Q8:   

What is self referencing foreign key? Give an example.

  
Add to PDF   Junior 
Q9:   

Explain foreign key constraint in MySQL

  
Add to PDF   Junior 
Q10:   

Explain DEFAULT constraint in MySQL

  
Add to PDF   Junior 
Q11:   

What are different integer data types in MySQL? How can you use unsigned integer in MySQL?

  
Add to PDF   Junior 
Q12:   

What is the use of DELIMETER command in MySQL?

  
 Add to PDF   Mid 
Q13:   

What are key constraints. What different types of constraints are there in MySQL?

  
 Add to PDF   Mid 
Q14:   

What are REPEAT, LOOP and WHILE statements used for?

  
 Add to PDF   Mid 
Q15:   

What is difference between BLOB and TEXT in MySQL?

  
 Add to PDF   Mid 
Q16:   

What happens if a parent row which is referenced by child row is being deleted in case of foreign key constraint?

  
 Add to PDF   Mid 
Q17:   

What are different TEXT data types in MySQL. What is difference between TEXT and VARCHAR?

  
 Add to PDF   Mid 
Q18:   

What is MySQL Workbench?

  
 Add to PDF   Mid 
Q19:   

What is the use of IN and BETWEEN in MySQL queries?

  
 Add to PDF   Mid 
Q20:   

What different stored objects are supported in MySQL?

  
 Add to PDF   Mid 
Q21:   

What is a trigger. What are different type of triggers in MySQL?

  
 Add to PDF   Mid 
Q22:   

What is index in MySQL? What is advantage of index?

  
 Add to PDF   Mid 
Q23:   

What is the difference between commands create database and create schema in MySQL?

  
 Add to PDF   Mid 
Q24:   

What is mysqldump?

  
 Add to PDF   Mid 
Q25:   

Both TIMESTAMP and DATETIME are used to store data and time. Explain difference between them and when should one be used?

  
 Add to PDF   Mid 
Q26:   

What is Stored Function in MySQL. How are they different from Stored Procedure?

  
 Add to PDF   Mid 
Q27:   

What are Derived Columns. What possible problems can a derived column pose?

  
 Add to PDF   Mid 
Q28:   

Explain the use of FEDERATED tables in MySQL

  
 Add to PDF   Mid 
Q29:   

How can VIEW be used to provide security layer for your app?

  Related To: SQL
 Add to PDF   Mid 
Q30:   

Explain GRANT command in MySQL

  
 Add to PDF   Mid 
Q31:   

What is cursor used in MySQL? What are properties of MySQL cursor?

  
 Add to PDF   Senior 
Q32:   

What are some advantages and disadvantages of stored procedures in MySQL?

  
 Add to PDF   Senior 
Q33:   

What is faster, one big query or many small queries?

  Related To: SQL
 Add to PDF   Senior 
Q34:   

What is autocommit in MySQL? Can you run a transaction without disabling autocommit?

  
 Add to PDF   Senior 
Q35:   

What is Memory Storage Engine in MySQL? What are heap tables?

  
 Add to PDF   Senior 
Q36:   

What is master-slave replication in MySQL? What are its advantages?

  
 Add to PDF   Senior 
Q37:   

What is advantage of FULLTEXT over LIKE for performing text search in MySQL?

  
 Add to PDF   Senior 
Q38:   

Compare MySQL and PostgresSQL

  
 Add to PDF   Senior 
Q39:   

What are differences between MyISAM and InnoDB database engines commonly used in MySQL?

  
 Add to PDF   Senior 
Q40:   

What is database engine or storage engine? Mention few storage engines supported by MySQL and their use.

  
 Add to PDF   Senior 
Q41:   

What does OPTIMIZE TABLE command do in MySQL?

  
 Add to PDF   Senior 
Q42:   

Which partitioning types does MySQL support?

  
 Add to PDF   Senior 
Q43:   

What are some major differences between MySQL and Oracle database?

  
 Add to PDF   Senior 
Q44:   

What are the differences between MongoDB and MySQL?

  Related To: MongoDB
 Add to PDF   Expert 
Q45:   

Why you should never use GUIDs as part of clustered index?

  Related To: Databases, PostgreSQL, T-SQL
 Add to PDF   Expert 
Q46:   

How do you make schema changes to a live database without downtime?

  Related To: Databases, PostgreSQL
 Add to PDF   Expert 
Q47:   

Which is better for JOIN & INSERT - PostgreSQL or MySQL?

  Related To: PostgreSQL
 Add to PDF   Expert 
Q48:   

What is the use of SAVEPOINT in MySQL?

  
 Add to PDF   Expert 
Q49:   

How many tables can a trigger associate to in MySQL? Can a trigger be associated to a view?

  
 Add to PDF   Expert 
Q50:   

What happens to a trigger in MySQL if an operation which trigger is associated with fails? Does the trigger execute?

  
 Add to PDF   Expert 
Q51:   

What is difference between horizontal and vertical partitioning? Does MySQL support both horizontal and vertical partitioning?

  
 Add to PDF   Expert 

Code Challenges

Q1:   

How can you delete one or multiple columns from a MySQL database table?

  
 Add to PDF   Junior 
Q2:   

Find duplicate values in a SQL table

  Related To: SQL
  Add to PDF   Mid 
Q3:   

What happens if a duplicate entry is already there when adding constraint?

  
  Add to PDF   Mid 
Q4:   

What is AUTO INCREMENT in MySQL? Explain with an example.

  
  Add to PDF   Mid 
Q5:   

How can you add one or multiple columns after a certain column in an existing MySQL table?

  
  Add to PDF   Mid 
Q6:   

How can ENUM be used in MySQL. Give an example.

  
  Add to PDF   Mid 
Q7:   

Write a query to concatenate and display all DISTINCT names in a single row

  
  Add to PDF   Senior 
Q8:   

Provide an example of UPSERT logic using MySQL

  
  Add to PDF   Senior 
Q9:   

Remove duplicate rows from a table

  
  Add to PDF   Senior 
Q10:   

A multiple column index is created over firstName, lastName, city columns of a Customer table. Will this index be used for SELECT queries based on only first_name, only last_name or only city values?

  
  Add to PDF   Senior 
 

Rust has been Stack Overflow’s most loved language for four years in a row and emerged as a compelling language choice for both backend and system developers, offering a unique combination of memory safety, performance, concurrency without Data races...

Clean Architecture provides a clear and modular structure for building software systems, separating business rules from implementation details. It promotes maintainability by allowing for easier updates and changes to specific components without affe...

Azure Service Bus is a crucial component for Azure cloud developers as it provides reliable and scalable messaging capabilities. It enables decoupled communication between different components of a distributed system, promoting flexibility and resili...

Cosmos DB has gained popularity among developers and organizations across various industries, including finance, e-commerce, gaming, IoT, and more. Follow along and learn the 24 most common and advanced Azure Cosmos DB interview questions and answers...
More than any other NoSQL database, and dramatically more than any relational database, MongoDB's document-oriented data model makes it exceptionally easy to add or change fields, among other things. It unlocks Iteration on the project. Iteration f...
Unit Tests and Test Driven Development (TDD) help you really understand the design of the code you are working on. Instead of writing code to do something, you are starting by outlining all the conditions you are subjecting the code to and what outpu...
Domain-Driven Design is nothing magical but it is crucial to understand the importance of Ubiquitous Language, Domain Modeling, Context Mapping, extracting the Bounded Contexts correctly, designing efficient Aggregates and etc. before your next DDD p...
At its core, Microsoft Azure is a public cloud computing platform - with solutions including Infrastructure as a Service (IaaS), Platform as a Service (PaaS), and Software as a Service (SaaS) that can be used for services such as analytics, virtual c...
As an asynchronous event-driven JavaScript runtime, Node.js is designed to build scalable network applications. Follow along to refresh your knowledge and explore the 52 most frequently asked and advanced Node JS Interview Questions and Answers every...
Dependency Injection is most useful when you're aiming for code reuse, versatility and robustness to changes in your problem domain. DI is also useful for decoupling your system. DI also allows easier unit testing without having to hit a database and...