Sunday, 21 December 2014


Now all SQL Server Interview Questions and answers at one place. Here we come with all Sql server questions asked during SQL Interview. This is not matter if you are a fresher or Experienced (DBA), these questions for all, From very simple to very complex. And Soon we come with answers as well as PDF.
So now you don't need to visit here and there for Sql Server Interview Interview/Telephonic Interview Questions.

1). What is RDBMS?
2). What are the properties of the relational tables?
3). What is Normalization?
4). What is De-Normalization?
5). What is Self Join?
6). What is Cross Join?
7). What are the different types of cursor?
8). What is a default constraint?
9). How to strip all non-alphabetic characters from string in SQL Server?
10). How do I find a value anywhere in a SQL Server Database?
11). Suppose that you have a table with AreaID but for that column you forgot set Identity. later you got it. Now you want to set identity without effecting the current records, and you only enabled Identity with seed 1. Then what would be the next value for AreaID in our below table example?
11.1). How to pass an array(or a table variable) into a SQL Server stored procedure?
12). When should you use "with (nolock)"?
13). Is it possible to insert into two tables at the same time?
14). Preferred Method of Storing Passwords In Database?
15). Can a view be updated/inserted/deleted? If Yes – under what conditions?
16). Where the integrity constraints are stored in data dictionary?
17). How many LONG columns are allowed in a table? Is it possible to use LONG columns in WHERE clause or ORDER BY?
18). What are different types of Collation Sensitivity?
19). What is SQL Server Agent?
20). How to convert Rows to Columns in SQL Server?
21). What is the difference between ROW_NUMBER and Ranking function in SQL SERVER?
22). Difference between Where clause and Having clause in SQL Server?
23). What is data dictionary?
24). Explain the use of SSIS in BI?
25). In Linq Query why from clause come first as select statment ?
26). What is Collation?
27). How to convert a table data in XML format in sql server?
28). What are the different types of locks?
29). What are Pessimistic and optimistic Locks?
30). What is the difference between an Update and Exclusive lock?
31). What is the difference between table and view in sql server?
32). What is NOLOCK hint?
33). What is collation?
34). What is the difference between DATETIME2 and DATETIME?
35). Explain Geography datatype in SQL Server?
36). What is nolock hint in sql server 2008?
37). What are the different types of SQL Commands?
38). What is the difference between a DDL trigger and a DML trigger?
39). What are the types of transaction levels in SQL SERVER?
40). Which TCP/IP port does SQL Server run on? How can it be changed?
41). What is @@ERROR?
42). what is the difference between count(*) and count(1)?
43). What are the difference between clustered and a non-clustered index?
44). What's the maximum size of a row?
45). What is HINT?
46). How do you delete duplicate records?
47). How do you delete all tables?
48). What is Aggregate function?
49). What is the difference between a query and stored procedure?
50). What will be the result of this query. select * from TableName order by 1 .Will this query throw an error?
51). What are the different index configurations a table can have?
52). What are the different types of BACKUPs avaialabe in SQL Server 2005?
53). What are the different locks in Sql Server?
54). What is OLTP (Online Transaction Processing)?
55). What's the difference between a primary key and a unique key?
56). What is the difference between DELETE and TRUNCATE statement?
57). What is SQL Profiler?
58). What are Data files?
59). What is difference between DELETE and TRUNCATE commands?
60). When is the use of UPDATE_STATISTICS command?
61). What is the default port of Microsoft SQl Server?
62). What is Data Compression in sql server 2012?
63). What is the difference between a HAVING CLAUSE and a WHERE CLAUSE?
64). What is a linked server?
65). What database does SQL Server use for temporary tables?
66). What are different Types of Sub-Queries?
67). What are the authentication modes in SQL Server? How can it be changed?
68). Which command using Query Analyzer will give you the version of SQL server and operating system?
69). What is service Broker?
70). What is the difference between HAVING and WHERE clause?
71). What is a B-Tree?
72). What is the difference between a HAVING CLAUSE and a WHERE CLAUSE?
73). What is an active database?
74). .........?
75). Can a stored procedure call itself or recursive stored procedure? How much level SP nesting is possible?
76). What is Log Shipping?
77). Name 3 ways to get an accurate count of the number of records in a table?
78). What does it mean to have QUOTED_IDENTIFIER ON? What are the implications of having it OFF?
79). What is the difference between a Local and a Global temporary table?
80). What is the STUFF function and how does it differ from the REPLACE function?
81). What is the difference between TEMP tables and Variable Tables?
82). What are the different String Functions in SQL Server?
83). What are the different Index configurations a table can have?
84). What is a Filtered Index?
85). What are indexed views?
86). What is the restriction on Indexed view?
87). What are Statistics? How can you find it in SQL Server?
88). How you can remove time part of datetime in SQL Server?
90). What are the different Mathematical Functions in SQL Server?
91). What is the difference between COUNT and COUNT_BIG?
92). What is WITH CHECK OPTION on view?
93). What is the difference between INSTEAD OF TRIGGER and AFTER Trigger?
94). How is the ACID property related to the database?
95). What are the different normalization forms?
96). ..?
97). What is the difference between a local and a global variable?
98). What is PRIMARY KEY?
99). What is UNIQUE KEY constraint?
100). What is FOREIGN KEY?
101). What is CHECK Constraint?
102). What is the real time example of RIGHT Outer Join?
103). What are the types of database recovery models?
104). What is NOT NULL Constraint?
105). What are the different data types in SQL Server?
106). What is blocking?
107). What are the different Date functions in SQL Server?
108). How to get @@ERROR and @@ROWCOUNT at the same time?
109). What is a Scheduled Jobs or what is a Scheduled Tasks?
110). What are the advantages of using Stored Procedures?
111). What is a table called, if it has neither Cluster nor Non-cluster Index? What is it used for?
112). Can SQL Servers linked to other servers like Oracle?
113). What is BCP? When does it used?
114). How to implement one-to-one, one-to-many and many-to-many relationships while designing tables?
115). What is an execution plan? When would you use it? How would you view the execution plan?
116). What is the difference between CHAR and VARCHAR?
117). What is the difference between VARCHAR and VARCHAR (max)?
118). ..?
119). What is NOT NULL Constraint?
120). What is a Stored Procedure?
121). What are the different types of collation sensitivity?
122). What is dirty read?
123). How do you check collation and compatibility level for a database?
124). What is a covered Index?
125). What is the maximum row size for a table?
126). When I delete data from a table, Does SQL Server reduce the size of table?
127). How do you rebuild master database?
128). What is PIVOT and UN-PIVOT?
129). What is EXCEPT operation?
130). What are GROUPING Sets?
131). What are the row constructors inside SQL Server?
132). What are table valued parameters?
133). How do you identify and resolve deadlock?
134). What are Spare columns?
135). How to get last inserted id?
136). Which is database shrinking?
137). What is the maximum number of columns a table can have?
138). What are included columns?
139). What is INTERSECT operation?
140). What is RAID?
141). What are the limitations of Select Into clause?
142). What is FileStream in SQL Server?
143). What do you mean by TableSample?
144). What are the disadvantages of using Stored Procedure?
145). What is the difference between COMMIT and ROLLBACK?
146). What is Transaction?
147). How do you do Error Handling in SQL server?
148). What is RAISEERROR?
149). What is SQL INJECTION?
150). How do you find list of schema names and table names from the database?
151). Why can be there only one clustered index?
152). Can we create view on TEMP table?
153). Can we use constraints on TEMP Table?
154). How to recompile a stored procedure at run time?
155). Does the order of columns in UPDATE statement matters?
156). What are the different types of System database inside SQL Server?
157). What is the use of Transaction Log file?
158). What is the difference between view and Materialized view?
159). What is database mirroring?
160). How does SQL Server database engine work?
161). What is the maximum number of indices per table?
162). What are the purpose of Normalisation?
163). What does the Merge Statement do?
164). What are the new data types introduced in SQL Server 2012?
165). Define Hierarchyid data type?
166). What are synonyms?
167). What is CTE?
168). What are the advantages of CTE?
169). Can we write Sub Queries into Simple Select Using join and CTE?
170). Can CTE be recursive? Till what level it can be nested?
171). What is LINQ?
172). What is XML?
173). How can you find tables without Indexes?
174). How do you find the size of index?
175). How do you copy data from one table to another table?
176). What is ROW_NUMBER()?
177). What is ROLLUP clause?
178). What are ranking functions?
179). How do you stop a log file from growing too big?
180). How do we use DBCC commands?
181). What is CDC?
182). What are the main performance differences between varchar and nvarchar SQL Server data types?
183). What is the difference between varchar and nvarchar?
184). How do I insert multiple rows WITHOUT repeating the “INSERT INTO dbo.Blah” part of the statement?
185). What is the difference between Index Seek and Index Scan?
186). Can we insert data if the clustered index is disabled?
187). What is standby server?
188). How do you disable Index?
189). How do you enable index?
190). What are the steps to create a Table Partition?
191). What are the basics of Table Partitioning in SQL Server?
192). How do you copy tables, schemas, and views from one sql server to another SQL Server?
193). Where are SQL Server user names and passwords stored in?
194). Can we have Triggers on Temp table and Variable Table?
195). What is the syntax for encrypting a column in SQL Server?
196). How do you send email on SQL Server?
197). What is query optimization ?
198). How many maximum Identity columns we can have in a single table?
199). How to find all Triggers in database?
200). Can we add constraint on Variable Table?
201). What is Schema?
202). Can we create multiple constraints on a single column?
203). Can we rename table and column using ALTER command?
204). How to rename Table and Column?
205). How to rename Database?
206). What is the disadvantage of Index?
207). How can we find the table size?
208). How to find N highest salary?
209). What is the difference between data mirroring and log shipping?
210). What are the different backup options within SQL Server?
211). How to add DEFAULT constraint on existing column? Write query
212). How to add NOT NULL constraint on existing column? Write query
213). How do you find why query is running slow?
214). How to create foreign key constraints on temporary table?
215). What is Dynamic SQL?
216). Can we create a table name as Table?
217). What is the difference between CAST and CONVERT Function?
218). What Are Binary String Data Types?
219). How to execute Dynamic SQL?
220). Can we use Variable table in Dynamic SQL?
221). How to execute queries stored in a table?
222). How can you capture the length of column when it is text, image and ntext data type?
223). Is it possible to import data using TSQL?
224). How can you prevent TSQL code from running on a Production server?
225). Define Unique Key?
226). What is the use of SP_Helptext , SP_HelpIndex stored procedure?
227). Can we change order of triggers?
228). What do you understand by Joins in SQL Server?
229). How to disable Auto Commit in SQL Server?
230). Can we recover deleted data?
231). How to delete Top 100 records from a table?
232). How to delete two tables using one Drop command?
233). Can I create CTE in Trigger?
234). Can we create Variable table in Trigger?
235). Can we use cursors in Trigger?
236). Can we call Stored Procedure in Trigger?
236). Can we call Stored Procedure in Trigger?
236.1). Can we call Stored Procedure in a View?
Ans : Click here
237). Can I create Triggers on TEMP table?
238). Can we use PRINT Command in Triggers?
239). How Triggers are fired?
240). Why do we use DECLARE for cursor and Variable table?
241). How to take database online –offline?
242). How to copy data using Bulk copy when columns data type doesn’t match?
243). What is SP_Configure commands and SET commands?
244). Can Inserted table have multiple records?
245). Can we perform DML & DDL operation on Inserted and Deleted tables?
246). What is the advantage of Index?
247). Which is fast UNION or UNION ALL?
248). Can we create clustered index on view?
249). Can we create computed columns?
250). Can we change the Column Sequence order inside table?
251). Truncate is DDL or DML?
252). Can we create view from view?
253). What the difference between UNION and UNIONALL?
254). How to join two tables from different database?
255). Can we use ORDER BY Clause in UNION?
256). What is difference between Deterministic and Non Deterministic Functions?
257). What is Synchronous and asynchronous function?
258). Can we add Identity column after creating the table?
259). Can we drop Identity column?
260). Can we store Image, MP3 and binary data in SQL Server?
261). How can we disable Identity column?
262). Can Foreign key column have NULL?
263). How to find column description of a table?
264). How to delete Duplicate records?
265). How to find employees hired in last month?
266). How to find all rows that contains only numeric data?
267). How to find primary key name if not given by the user for a particular column?
268). Can we add two columns using ALTER command?
269). How to get row number without ROW_NUMBER function?
270). What is Partitioned View?
271). What is the difference between UNIQUE Key and Primary Key?
272). How to find who deleted/ dropped from Transaction log?
273). Can we ALTER two columns using ALTER command?
274). How to clean Buffer in SQL Server?
275). How to clear Execution Plan cache?
276). How can we check for existence of any object in database?
277). What is meant by differed name resolution in SQL Server?
278). How to find Organization Employee Hierarchy using SQL?
279). How does a recursive CTE works?
280). What is Auditing inside SQL Server?
281). What is the difference between GETDATE() and SYSDATETIME()?
282). How do you check if Automatic Statistic Update is enabled for a database?
283). What are the limitations of view?
284). How to find department with highest number of employees?
285). What are different operation available on ONDELETE and ONUPDATE?
286). What are the uses of System tables?
287). What are WAIT Types?
288). What is Data Page?
289). What is FILL Factor?
290). Sql server difference between view and stored procedure?
291). Sql server difference between unique and nonunique index?
292). Sql server difference between update lock and exclusive lock?
293). Sql server difference between windows authentication and sql server authentication?
294). Sql server difference between sysobjects and sys.objects?
295). Sql server difference between session and connection?
296). Sql server difference between set and select variable?
297). Sql server difference between shrink database and shrink files?
298). Sql server difference between revoke and deny?
299). Sql server difference between rank and dense_rank?
300). Sql server difference between gdr and qfe?
301). Sql server difference between db_owner and dbo?
302). Sql server difference between log shipping and mirroring?
303). Sql server difference between isnull and coalesce?
304). Differences between ISNULL and IS NULL?
305). Difference between hadoop and sql server?
306). Difference between PatIndex and CharIndex function in SQL SERVER?
307). What is the difference between SQL Server standard and web edition?
308). Difference between numeric,float and decimal in sql server?
309). Difference between binary and varbinary datatype in Sql server?
310). Sql server difference between count(*) and count(1)
311). Sql server difference between exec and sp_executesql?
312). Difference between blocking and deadlock sql server?
313). Difference between detach and take offline in sql server?
314). Difference between Index Scan / Index Seek in sql server?
315). What is the difference between TRY_CONVERT and Convert?
Convert: enables you to convert data stored in one data type to another. The conversion might fail if you attempt to convert between data types where conversion is not possible.
TRY_CONVERT: is the same but if conversion fails, a NULL value is written.
316). Write down the query to get the list of tables changed with in the database in last 5 days?
317). Write a query to insert your name 1000 times without Using While Loop in SQL Server?
318). SQL Server 2016 came with new way to drop object if exist, Explain it.(DROP IF EXIST)
322). What do you understand by index_id = 0 and Index_id = 1, related to sys.indexes table? What they represent?
323). What are NDF files in SQL Server?
324). What is the difference between DateTime and DateTimeOffset data types in SQL Server?
325). What is Slot Array in Sql Server? How it is related to Database Page?
326). What is the extension for trace file in SQL Server Profiler? 
327). How to pass an array(or a table variable) into a SQL Server stored procedure?
328). What is forwarding pointer in SQL Server? How it is helpful in performance optimization?
329). How you will trace all event only from a selected Database or Procedure using SQL Server Profiler?
330). What is the difference between SQL, PL-SQL and T-SQL?
331). Name any three standard trace templates provided by SQL Server Profiler?
332). Can you edit Sql Profiler existing/default templates?
333). How to strip all non-alphabetic characters from string in SQL Server? 
334). Database dot dot TableName(Database..TableName) will point to which schema in SQL Server, Is this way to select data will fail or not?
335). Write down the query to get list of all supported language by SQL Server?
336). Name the SQL Server functions used to encrypt and decrypt password?
337). What would be the output of the following script?
    SET @Name = 'विकास अहलावत'
    SELECT @Name
338). What is the backup strategy in your organization? (TCS)
339). How to split a comma-separated value to columns?

340). What would be the output of following SQL Script.

341). What is the difference between Master, MSDB,TempDB and Model Databases?
342). What is the main rule of first normal form? second form ? third form?
343). What is the difference between Data files and Log Files in Sql Server?
344). How you will select all records using TOP keyword in SQL Statement, even you don't know the count of table?

What Do you think this is ending of SQL Server Interview Questions?


Reference :
Visit Our New Site for HR Interview Questions Answers
Sponsored Ads


  1. Great list of questions. I wonder if we can get pdf via email like for other questions, or is there anywhere to download it. I don't see answers to these questions here. Kind thanks in advance!

  2. Every Thing at one place looks good.
    Waiting for PDF.

  3. Everything is free there...
    Soon I will email PDF to all above

    1. Thanks.

    2. Thanks for this stuff.
      Please email this content (300 questions) on

    3. hi..send me Pdf with answers at

    4. send me the ans

    5. . Please send me the que and answers.

    6. . Please send me the que and answers.

    7. Please do send me the all these questions and answers too

  4. Pls email all.pdf

  5. Hi
    pls email all .pdf to


  6. Hi,
    Great Job...
    Pls email all PDF to


  7. please e mail to me
    Thank you

  8. Please Email all questions and answers to my mail id

  9. This comment has been removed by the author.

  10. Great list :) Pls email all questions and answers to

  11. sir its very usfull for interview which i needed , pls send questions and answers to email on

    thank you

  12. Please Email all questions and answers to my mail id
    Thank you

  13. Send me all this material its very useful my mail I'd:vidhya.alerts63

  14. Thanks Vikas for your time and effort for making so good and relevant question set. Couild you please send me all pdfs on

  15. ir its very usfull for interview which i needed , pls send questions and answers to

  16. please send pdf to

  17. Please send me PDF to

  18. Hello, Great article and list of questions.
    I would love the PDF as well, can you please send to

  19. Hi it looks great ... can you please email the question and ans to my mail id :

  20. Can you please send the question and answer for the email I'd given below.

  21. can u pls send pdf to

  22. Can U Please email PDF to

  23. Hey Nice job Grate Stuff.
    Could you please send this PDF to

  24. Hi,
    Great Job...
    Pls email all PDF to

  25. Hi,

    Pls email me this PDF to


  26. Great list of questions... please email answers and pdf to this email much appreciated.. good work

  27. Please email the Question and Answers PDF to

  28. Hi Vikas,

    Includes everything. Please email the Question and Answers PDF to

    Thank you :)

  29. Can you please send the question and answer for the email I'd given below.

  30. It's so helpful! Thank you for sharing! could you send me all PDFs with answer to ?
    much appreciated...

  31. Hi Vikas,
    Its a very helpful material. Can you please mail the above questions and answers to
    Thanks in advance.. :) :)

  32. Hi Vikas,

    Thank you for the help.
    Could you please mail this questions and answers to


  33. Great post all the questions at one place,
    Please send the answers PDF to
    Thanks in advance.

  34. Thank you

    very useful SQL Serevr questions for interview
    please send the pdf with answer to

  35. please email answers pdf - Great questions

  36. Thank you

    very useful SQL Serevr questions for interview
    please send the pdf with answer to shivprasadpawar1

  37. Thanks so much for providing such a vast and useful list of SQL interview questions.
    Please send the PDF to

  38. please email me

  39. Hiii,
    Please send me the pdf.


  40. Hi Thank you so much. it is very informative and helpful. I have an intevriew in 2 days.can you please email me the pdf and answers at TIA. i highly appreciate it

  41. please send the pdf with answer to

  42. Please send me all ( SQL,, MVC, OOps, WCF) Interview questions and answers to

  43. Please send me the question and answers to send it as soon as possible

  44. Can you please send the question and answer for the email I'd given below.

  45. This comment has been removed by the author.

  46. Pls send answers to

  47. Hey good job,
    Can you please send the pdf to email id
    I need sql server 2008 , sql n related questions wid answers..

  48. good pls can you send pdf

  49. Can you please send the question and answer for the email I'd given below.
    Thanks in advance.

  50. hey, that's really good collection. Can u please send me pdf on my email id:

  51. Great collectoin! Can you please email me the PDF at


  52. Greate collection any one email me

  53. Greate collection any one email me

  54. Please mail me at

  55. Please mail me at

  56. Please mail me at

  57. Hi,
    This is very informative.
    Can you please mail me the PDF at

    Thanks in advance.

  58. Hello,
    Would you please Email me the *.pdf at
    Your assistance would be much appreciated.

  59. Hello, Please mail me the pdf to
    Thanks in advance

  60. nice,
    can you email me Q/A in PDF?

  61. Pls send answers to

  62. kindly fwd to the mail Thank you

  63. Please email pdf to my id


  65. This comment has been removed by the author.

  66. Hi,
    Please send me the sql server questions complete pdf to

  67. hi,
    please email me the PDF at

  68. Thank you for your time.Please send the PDF at
    Thanks a lot

  69. please can you email all the questions and answers to

  70. pls send me the all questions ad answers to

  71. please mail the answer to, need urgent

  72. please mail me the answers to

  73. please mail me the Questions ans answer pdf to

  74. please mail me the question and answers to

  75. Hi,
    Please send me the questions & answers complete pdf to
    Thanks a lot

  76. Hi, please send these to my mail... .
    Thanks in advance.

  77. Hi,
    Please send me the questions & answers complete pdf to
    Thanks a lot

  78. Plz share me those questions and answers to my mail I'd : it will be help to get the job easily.

  79. Plz share me the questions and answers to mail id so that we can get the job easily.

  80. Hi.. Please send me PDF. at

  81. Hi,
    Please send me the questions & answers complete pdf to
    Thanks a lot

  82. please mail me questions & answers complete pdf to --

  83. hi, I ddint receive any pdf yet, could you please mail me

  84. Hi Vikas .. very nice work.

    thanks a lot in advance.

  85. Hi Vikash, really great work! can you please email me the answers of this questions to

  86. Please send me put q&a

  87. Please send me the question and answers to send it as soon as possible

  88. please Send me the Question And Answers to Send it As soon As Possible

  89. pls email to

  90. Nice job Grate Stuff.
    Could you please send this PDF to

  91. Hi friend you did a great job.
    kindly send me these question and answers to my mail.


  92. Can you please send me this PDF to

  93. Hello Dear
    Please send me the questions & answers complete pdf to