SQL Server Interview Questions With Answer (Complete List)

Click on any question below to see their answer :
1. What is the difference between “Stored Procedure” and “Function”?
2. What is difference between “Clustered Index” and “Non Clustered Index”?
3. What is the difference between the “DELETE” and “TRUNCATE” commands?
4. What is the difference between the “WHERE” clause and the “HAVING” clause?
5. What is the difference between “Primary Key” and “Unique Key”?
6. What is the difference between a “Local Temporary Table” and “Global Temporary Table”?
7. What is the difference between primary key and unique constraints?
8. What are super, primary, candidate and foreign keys?
9. What is SQL?
10. What is database normalization?
11. How do you implement one-to-one, one-to-many and many-to-many relationships while designing tables?
12. What are the differences between DDL, DML and DCL in SQL?
13. What is Identity?
14. What is a view in SQL Server ? How to create one.
15. What are the benefit or uses of view?
16. What are the different type of SQL or different commands in SQL?
17. what is a field in a database ?
18. What is a Record in a database ?
19. What is a Table in a database ?
20. What is a database transaction?
21. What are properties of a transaction?
22. What is a Database Lock ?
23. What are the different type of normalization?
24. What is a primary key?
25. What is a Composite Key ?
26. What is a Composite Primary Key ?
27. What is a Foreign Key ?
28. What is a Unique Key ?
29. Define candidate key, alternate key, composite key.
30. Define Join and explain different type of joins?
31. What is a materialized view?
32. What are the advantages and disadvantages of views in a database?
33. What is a stored procedure and its advantage?
34. What is Union, minus and Interact commands?
35. What are defaults? Is there a column to which a default can’t be bound?
36. What is a deadlock and what is a live lock? How will you go about resolving deadlocks?
37. What is blocking and how would you troubleshoot it?
38. What are the steps you will take to improve performance of a poor performing query?
39. Explain CREATE DATABASE syntax
40. How to restart SQL Server in single user mode? How to start SQL Server in minimal configuration mode?
41. What are statistics, under what circumstances they go out of date, how do you update them?
42. What are the different ways of moving data/databases between servers and databases in SQL Server?
43. What are cursors? Explain different types of cursors. What are the disadvantages of cursors? How can you avoid cursors?
44. What is User Defined Functions? What kind of User-Defined Functions can be created?
45. What is sub-query? Explain properties of sub-query?
46. What is the STUFF function and how does it differ from the REPLACE function?
47. What are the basic functions for master, msdb, model, tempdb and resource databases?
48. Can a stored procedure call itself or recursive stored procedure? How much level SP nesting is possible?
49. What is CTE? What are the Advantages of using CTE?
50. How would you handle error in SQL SERVER ?
51. What do you mean by Table Sample?

Leave a Comment

Your email address will not be published. Required fields are marked *