QUESTPOND ONLINE COURSE

SQL Server Interview Questions and Answers

What you'll learn

  • How to answer basic SQL Server interview questions around Normalization,De-normalization,First/Second/Third Normal forms,OLTP and OLAP.
  • Comparison SQL Server interview questions around Primary key vs Unique key,Char vs Nchar,Char vs Varchar,Clustered vs Non-clustered,Insteadof vs After triggers
  • SQL Query writing questions around Inner joins,Left joins,Right joins,Outer joins , Cross joins ,Union vs Union All,Subqueries  & Co-related Queries
  • Tricky Questions around Join vs Subquery,Group by,Having vs Where,Identity columns,Transactions, Aggregate functions, Sorting and Distinct keyword
  • Extensive explanation of tricky questions like Select top nth Salary,joins vs Subquery,Self joins,Nulls,Wild cards,Alias & Top keyword
  • One complete chapter dedicates to CTE(Common table expression) which covers definitions,recursive CTE,CTE scenarios,Temp tables vs CTE and CTE performance

Course Curriculum

Explore the topics covered in this course.

+
Must and Basic Questions on SQL Server. Click to view syllabus
Module 1

Must and Basic Questions on SQL Server - Part 1
Question 1  :- Explain normalization ?
Question 2  :- How to implement normalization ?
Question 3  :- What is denormalization ?
Question 4  :- Explain OLTP vs OLAP ?
Question 5  :- Explain 1st,2nd and 3rd Normal form ?
Question 6  :- Primary Key vs Unique key ?
Question 7  :- Differentiate between Char vs Varchar ?
Question 8  :- Differentiate between Char vs NChar ?
Question 9  :- Whats the size of Char vs NChar ?
Question 10 :- What is the use of Index ?
Question 11 :- How does it make search faster?
Question 12 :- What are the two types of Indexes ?
Question 13 :- Clustered vs Non-Clustered index
Question 14 :- Function vs Stored Procedures
Question 15 :- What are triggers and why do you need it ?
Question 16 :- What are types of triggers ?
Question 17 :- Differentiate between After trigger vs Instead Of ?
Question 18 :- What is need of Identity ?
Question 19 :- Explain transactions and how to implement it ?
Question 20 :- What are inner joins ?
Question 21 :- Explain Left join ?
Question 22 :- Explain Right join ?
Question 23 :- Explain Full outer joins ?
Question 24 :- Explain Cross joins ?

Interview Questions around essential concepts of SQL Server - Part 2
Question 25:-Why do we need UNION ?
Question 26:-Differentiate between Union vs Union All ?
Question 27:-can we have unequal columns in Union?
Question 28:-Can column have different data types in Union ?
Question 29:- Which Aggregate function have you used ?
Question 30:- When to use Group by ?
Question 31:- Can we select column which is not part of group by ?
Question 32:- What is having clause ?
Question 33:- Having clause vs Where clause
Question 34:- How can we sort records ?
Question 35:- Whats the default sort ?
Question 36:- How can we remove duplicates ?
Question 37:- Select the first top X records ?
Question 38:- How to handle NULLS ?
Question 39:- What is use of wild cards ?
Question 40:- What is the use of Alias ?
Question 41:- How to write a case statement ?
Question 42:- What is self reference tables ?
Question 43:- What is self join ?
Question 44:- Explain the between clause ?

Important questions on SubQuery and Cor-related Queries in SQL-Part 3
Question 45:- Explain SubQuery?
Question 46:- Can inner Subquery return multiple results?
Question 47:- What is Co-related Query?
Question 48:- Differentiate between Joins and SubQuery?
Question 49:- Performance Joins vs SubQuery?

How to Find Nth Highest Salary ? - Part 4
Question 50:- Find NTH Highest Salary in SQL.


Covered Questions on finding Nth highest using co-related & TSQL-Part 5
Question 51:-  Select the top nth highest salary using correlated Queries?
Question 52:-  Select top nth using using TSQL
Question 53:-  Performance comparison of all the methods.

Questions around SQL Server CTE(Common Table Expressions) - Part6
Question 54 :- What is CTE ?
Question 55 :- Can we execute CTE multiple times ?
Question 56 :- What is use of CTE ?
Question 57 :- How to write a recursive CTE ?
Question 58 :- Can we see some real world examples of CTE ?
Question 59 :- Can we perform insert updates on CTE?
Question 60 :- Does is update the tables physically ?
Question 61 :- What are temporary tables?
Question 62 :- Temp tables vs CTE
Question 63 :- Performance CTE vs Temp

Questions around Window functions, Rank, Dense_Rank and RowNumber - Part 7
Question 64 :- What are window functions in SQL ?
Question 65 :- What does partition clause in window function ?
Question 66 :- So is window function partition similar to group by ?
Question 67 :- What is difference between Rank vs Dense_Rank ?

Questions around Delete Duplicate Records scenarios - Part 8
Question 68 :- Find records which are unique.
Question 69 :- Delete Duplicate Records (with Id).
Question 70 :- Delete Duplicate Records (without Id).
Question 71 :- Delete Duplicate Records (using CTE).
Question 72 :- Delete Millions of Duplicate Records without performance impact.