1. What is a primary key in SQL Server?
2. What is a JOIN in SQL Server? Provide examples of joins.
3. What is the purpose of the DISTINCT keyword in T-SQL? Provide an example.
4. How do you use the TOP clause in T-SQL? Provide an example.
5. What is the purpose of the LIKE operator in T-SQL? Provide an example.
6. How do you use the UNION operator in T-SQL? Provide an example.
7. What is the difference between the UNION and UNION ALL operators in T-SQL?
8. What is a subquery in T-SQL and how is it used? Provide an example.
9. What is the difference between a DELETE statement and a TRUNCATE statement in SQL Server?
10. How do you sort the result set of a query in T-SQL?
11. What is the purpose of the GROUP BY clause in T-SQL?
12. What is the difference between the WHERE and HAVING clauses in T-SQL?
13. How does the CASE statement work in T-SQL? Provide an example.
14. What is the ROW_NUMBER() function in T-SQL and how is it used?
15. What is a Common Table Expression (CTE) in T-SQL and how do you create one?
16. What is the purpose of the ISNULL() function in T-SQL? How is it different from COALESCE()?
17. What is the purpose of the LEAD() and LAG() functions in T-SQL? Provide examples.
18. What is the difference between a clustered index and a non-clustered index?
19. What is a columnstore index in SQL Server, and how does it differ from a traditional rowstore index?
20. What is the purpose of the NOLOCK table hint, and when would you use it? Provide an example.