SQL
1. Explain the difference between INNER JOIN, LEFT JOIN, RIGHT JOIN, and FULL OUTER JOIN. Provide
examples of when you would use each.
2. Describe what a subquery is and provide an example of a situation where a subquery would be
useful.
3. What are indexes in SQL, and how do they improve query performance? Can you provide an
example of how to create an index?
4. Explain the concept of database normalization. What are the different normal forms, and why is
normalization important?
5. What are Common Table Expressions (CTEs) in SQL? Provide an example of how to use a CTE in a
query.
SQL Interview Questions
1. How do you select all columns from a table named employees?
2. What is a primary key, and why is it important?
3. How do you add a new column named email to an existing table users?
4. What is the difference between DELETE and TRUNCATE commands?
5. How do you retrieve unique values from a column named department in the employees table?