DELETE
, TRUNCATE
, and DROP
in SQL Server?2. What are the different types of
JOINs
available in SQL Server?3. What is a clustered index and how does it differ from a non-clustered index?
4. What are the ACID properties in a SQL transaction?
5. What is normalization? Explain different normal forms.
6. What is denormalization and when would you use it?
7. What is the difference between
WHERE
and HAVING
clauses?8. What is a stored procedure? How is it different from a function?
9. What is a trigger and when should you use it?
10. What is a Common Table Expression (CTE)?
11. What is the purpose of the
ROW_NUMBER()
, RANK()
, and DENSE_RANK()
functions?12. What is an execution plan? How do you view it in SQL Server?
13. What is the difference between
ISNULL()
and COALESCE()
?14. What are temp tables and table variables? How do they differ?
15. What is indexing and how does it improve performance?
16. What is a transaction in SQL Server? How do you manage transactions?
17. What are the isolation levels in SQL Server?
18. What is a deadlock? How do you detect and prevent it in SQL Server?
19. What are the differences between
INNER JOIN
and OUTER JOIN
?WITH (NOLOCK)
in a query? 21. Explain the difference between clustered and non-clustered indexes. When would you use each?
22. What are covering indexes and how do they improve performance?
23. What are execution plans and how do you use them to optimize queries?
24. What are included columns in indexes and how do they differ from key columns?
25. What is a deadlock in SQL Server? How do you detect and resolve it?
26. Explain isolation levels in SQL Server. When would you use READ COMMITTED SNAPSHOT
?
27. What is parameter sniffing and how can it affect performance?
28. How do you monitor and troubleshoot slow-running queries?
29. What are temporary tables vs table variables? Which one would you prefer in stored procedures?
30. How do you use CTEs (Common Table Expressions) and recursive queries in SQL Server?
31. What is the difference between MERGE
, UPSERT
, and a manual IF EXISTS
approach?
32. Explain the use of ROW_NUMBER()
, RANK()
, and DENSE_RANK()
with real-world scenarios.
33. What are indexed views? What are their limitations?
34. How do partitions work in SQL Server and when would you use table partitioning?
35. What is the role of statistics in SQL Server and how do you update them?
36. Explain how transactions work and how you handle nested transactions.
37. What is the difference between synchronous and asynchronous replication in SQL Server?
38. How do you implement error handling in T-SQL using TRY...CATCH
blocks?
39. What is blocking vs deadlocking, and how do you identify blocking sessions?
40. How do you secure sensitive data in SQL Server (e.g., encryption, roles, permissions)?
Linq interview questions
41. What is LINQ and what are its advantages?
42. What are the different types of LINQ providers?
43. What is the difference between LINQ to Objects, LINQ to SQL, and Entity Framework?
44. What is deferred execution in LINQ?
45. What is the difference between IEnumerable
and IQueryable
?
46. How does LINQ handle lazy loading and eager loading?
47. What is the difference between Select()
and SelectMany()
?
48. What is the difference between First()
, FirstOrDefault()
, Single()
, and SingleOrDefault()
?
49. What are anonymous types in LINQ?
50. How does grouping work in LINQ? Explain with group by
.
51. What is the use of the let
keyword in LINQ?
52. What are extension methods, and how are they used in LINQ?
53. What is method syntax vs query syntax in LINQ?
54. What is join
in LINQ and how does it work internally?
55. How can you perform a left outer join in LINQ?
56. What are lambda expressions and how are they used in LINQ?
57. How do you handle null values in LINQ queries?
58. What are aggregate functions in LINQ? (e.g., Sum()
, Count()
, Average()
)
59. How can you optimize LINQ queries for performance?
60. What is AsEnumerable()
, ToList()
, and ToArray()
in LINQ?
61. What is the difference between LINQ to Objects, LINQ to SQL, and LINQ to Entities?
62. How does deferred execution work in LINQ? What are its advantages and potential pitfalls?
63. What is the difference between IEnumerable<T>
and IQueryable<T>
?
64. How does a LINQ expression tree differ from delegates in query execution?
65. How do you optimize LINQ queries for performance and memory usage in large data sets?
66. How does LINQ handle null values and what are best practices for null safety?
67. What are extension methods and how are they used in LINQ?
68. Explain the role of lambda expressions in LINQ. How are they compiled and executed?
69. What is the difference between Select
, SelectMany
, and GroupBy
in LINQ?
70. How do you write custom LINQ extension methods and when would you use them?
71. How do you perform joins (inner, left, group) using LINQ?
72. What are lazy loading and eager loading in the context of LINQ to Entities?
73. How does LINQ to SQL translate queries to T-SQL? What are limitations you have faced?
74. How do you debug complex LINQ queries efficiently?
75. What is the impact of using ToList()
, ToArray()
, or AsEnumerable()
at different stages in a LINQ chain?
76. How would you perform paging and sorting using LINQ?
77. What is query syntax vs method syntax in LINQ, and when should each be used?
78. Can LINQ queries be parallelized? What are the considerations when using PLINQ?
79. How does LINQ compare with traditional SQL in terms of maintainability and performance?
80. How do you handle composite filtering and dynamic query building in LINQ?
No comments:
Post a Comment