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 44 SQL Interview Questions

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

Theoretical Questions

Q1:   

Define a Temp Table

  
Add to PDF   Entry 
Q2:   

What is PRIMARY KEY?

  
Add to PDF   Entry 
Q3:   

What is a VIEW?

  
Add to PDF   Entry 
Q4:   

What is Normalisation?

  Related To: Databases
Add to PDF   Junior 
Q5:   

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

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

What is the difference between TRUNCATE and DELETE?

  Related To: MySQL
Add to PDF   Junior 
Q7:   

What is DEFAULT?

  
Add to PDF   Junior 
Q8:   

What is FOREIGN KEY?

  
Add to PDF   Junior 
Q9:   

What is the difference between INNER JOIN, OUTER JOIN, FULL OUTER JOIN?

  
 Add to PDF   Mid 
Q10:   

What is the difference between UNION and UNION ALL?

  
 Add to PDF   Mid 
Q11:   

Describe the difference between truncate and delete

  
 Add to PDF   Mid 
Q12:   

What is Denormalization?

  Related To: Databases
 Add to PDF   Mid 
Q13:   

What's the difference between a Primary Key and a Unique Key?

  Related To: Databases
 Add to PDF   Mid 
Q14:   

What are the difference between Clustered and a Non-clustered index?

  Related To: Databases
 Add to PDF   Mid 
Q15:   

How does a Hash index work?

  
 Add to PDF   Mid 
Q16:   

How a database index can help performance?

  Related To: Databases
 Add to PDF   Mid 
Q17:   

What is the difference between WHERE clause and HAVING clause?

  
 Add to PDF   Mid 
Q18:   

What is the difference between JOIN and UNION?

  
 Add to PDF   Mid 
Q19:   

What is Collation?

  
 Add to PDF   Mid 
Q20:   

What is the difference between INNER JOIN and OUTER JOIN?

  
 Add to PDF   Mid 
Q21:   

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

  Related To: MySQL
 Add to PDF   Mid 
Q22:   

Discuss INNER JOIN ON vs WHERE clause (with multiple FROM tables)

  
 Add to PDF   Mid 
Q23:   

Define ACID Properties

  Related To: Databases
 Add to PDF   Mid 
Q24:   

What’s the difference between Azure SQL Database and Azure SQL Managed Instance?

  Related To: Azure, T-SQL
 Add to PDF   Mid 
Q25:   

What is the cost of having a database index?

  Related To: Databases
 Add to PDF   Senior 
Q26:   

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

  Related To: MySQL
 Add to PDF   Senior 
Q27:   

What is the difference among UNION, MINUS and INTERSECT?

  
 Add to PDF   Senior 
Q28:   

Explain the difference between Exclusive Lock and Update Lock

  Related To: Databases
 Add to PDF   Senior 
Q29:   

How does B-trees Index work?

  Related To: Databases
 Add to PDF   Senior 
Q30:   

Name some disadvantages of a Hash index

  Related To: Databases
 Add to PDF   Expert 
Q31:   

What are some other types of Indexes (vs B-Trees)?

  Related To: Databases
 Add to PDF   Expert 
Q32:   

How does database Indexing work?

  Related To: Databases
 Add to PDF   Expert 
Q33:   

What is Optimistic Locking and Pessimistic Locking?

  Related To: Databases
 Add to PDF   Expert 
Q34:   

What is the difference between B-Tree, R-Tree and Hash indexing?

  Related To: Databases
 Add to PDF   Expert 
Q35:   

What is Index Cardinality and why does it matter?

  Related To: Databases, MongoDB
 Add to PDF   Expert 

Code Challenges

Q1:   

How to select first 5 records from a table?

  
  Add to PDF   Mid 
Q2:   

Find duplicate values in a SQL table

  Related To: MySQL
  Add to PDF   Mid 
Q3:   

What would happen without an Index?

  
  Add to PDF   Senior 
Q4:   

Delete duplicate values in a SQL table

  
  Add to PDF   Senior 
Q5:   

How can we transpose a table using SQL (changing rows to column or vice-versa)?

  
  Add to PDF   Senior 
Q6:   

How to generate row number in SQL without ROWNUM

  
  Add to PDF   Senior 
Q7:   

How does TRUNCATE and DELETE operations effect Identity?

  Related To: T-SQL
  Add to PDF   Senior 
Q8:   

How can I do an UPDATE statement with JOIN in SQL?

  
  Add to PDF   Senior 
Q9:   

Select first row in each GROUP BY group (greatest-n-per-group problem)?

  
  Add to PDF   Expert 
 

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...