SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SQL Server Interview Questions And Answers


SQL Server Interview Questions And Answers

Author
Message
Randheer
Randheer
Old Hand
Old Hand (326 reputation)Old Hand (326 reputation)Old Hand (326 reputation)Old Hand (326 reputation)Old Hand (326 reputation)Old Hand (326 reputation)Old Hand (326 reputation)Old Hand (326 reputation)

Group: General Forum Members
Points: 326 Visits: 166
Hi,

I want to initiate this topic because I feel we should share our interview question experience so it will help others to face the interview.
I know that good developers don’t need interview questions. But in general I feel most of the interviewers stuck around some common questions or some common answers and if you are not aware about these questions even though you are very good in your current organization or doing good work you will not be selected.

So better to read those questions also :-)

I have created the blog for the interview questions as per my understanding and interviews faced.
its http://sqlserverquest.blogspot.com

I hope people will keep posting more interview questions with solution. will discuss the interview questions and multiple approaches for the same.

Randheer Singh

----------------------------------
CheckOut My Blog for SQL Server Realated Topics and Interview Questions for SSIS , SSRS and TSQL.

http://www.sqlserverquest.com/p/ssrs-interview-questions.html
http://www.sqlserverquest.com/p/ssis-interview-questions.html
http://www.sqlserverquest.com/p/tsql-interview-questions.html
Koen Verbeeck
Koen Verbeeck
SSC Guru
SSC Guru (98K reputation)SSC Guru (98K reputation)SSC Guru (98K reputation)SSC Guru (98K reputation)SSC Guru (98K reputation)SSC Guru (98K reputation)SSC Guru (98K reputation)SSC Guru (98K reputation)

Group: General Forum Members
Points: 98450 Visits: 13320
There is nothing wrong with preparing yourself for an interview (you should be), but in my opinion, not knowing all the answers is not that bad.
If you can show the interviewer that you have good knowledge of the product and that you know how to research "the gaps of your knowledge", you should be fine.

It is impossible to know everything about SQL Server (except for a few exceptional people), so there is no shame in not knowing an answer (however, it is a shame not knowing any answer :-)).
If you don't know the answer, write the question down and send an e-mail later to the interviewer with the correct answer and how you researched the problem. I know some people who got the job after this technique.


How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
My blog at SQLKover.

MCSE Business Intelligence - Microsoft Data Platform MVP
GilaMonster
GilaMonster
SSC Guru
SSC Guru (365K reputation)SSC Guru (365K reputation)SSC Guru (365K reputation)SSC Guru (365K reputation)SSC Guru (365K reputation)SSC Guru (365K reputation)SSC Guru (365K reputation)SSC Guru (365K reputation)

Group: General Forum Members
Points: 365241 Visits: 46927
It's very easy for a good interviewer to tell the difference between someone who's memorised answers and someone who know the topic.

Don't exaggerate your skills.
Don't lie to the interviewer
Don't be afraid to say 'I don't know' (but have an idea how you'd find out)

p.s. I used to ask an 'unanswerable' question in interviews, just to see if the candidate would admit he didn't know or if he'd lie to me.

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


GilaMonster
GilaMonster
SSC Guru
SSC Guru (365K reputation)SSC Guru (365K reputation)SSC Guru (365K reputation)SSC Guru (365K reputation)SSC Guru (365K reputation)SSC Guru (365K reputation)SSC Guru (365K reputation)SSC Guru (365K reputation)

Group: General Forum Members
Points: 365241 Visits: 46927
p.s. You might want to spend some time validating and expanding the answers to your interview questions. Some are totally wrong, many are so vague as to not be answers.

eg: (from http://sqlserverquest.blogspot.com/2010/12/sql-server-interview-questions-and_21.html)

Difference between delete and truncate?
Data deleted with truncate command cannot be roll back one the transaction is committed. While data deletion with delete command can be roll back even if the transaction is committed.

That's incorrect on both points.

What are indexes in SQL Server?
Indexes are used to search the data in the database in well-mannered approach. Data can be searched by user without going into entire database.


Errr.....

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


Randheer
Randheer
Old Hand
Old Hand (326 reputation)Old Hand (326 reputation)Old Hand (326 reputation)Old Hand (326 reputation)Old Hand (326 reputation)Old Hand (326 reputation)Old Hand (326 reputation)Old Hand (326 reputation)

Group: General Forum Members
Points: 326 Visits: 166
How sql server retrieves the next identity value for delete command used in table as deleted rows are moved to log.
i just want to understand the actual process.

Randheer Singh

----------------------------------
CheckOut My Blog for SQL Server Realated Topics and Interview Questions for SSIS , SSRS and TSQL.

http://www.sqlserverquest.com/p/ssrs-interview-questions.html
http://www.sqlserverquest.com/p/ssis-interview-questions.html
http://www.sqlserverquest.com/p/tsql-interview-questions.html
Koen Verbeeck
Koen Verbeeck
SSC Guru
SSC Guru (98K reputation)SSC Guru (98K reputation)SSC Guru (98K reputation)SSC Guru (98K reputation)SSC Guru (98K reputation)SSC Guru (98K reputation)SSC Guru (98K reputation)SSC Guru (98K reputation)

Group: General Forum Members
Points: 98450 Visits: 13320
parmar.randheer11 (2/3/2011)
How sql server retrieves the next identity value for delete command used in table as deleted rows are moved to log.
i just want to understand the actual process.


I don't really see what IDENTITY has to do with the DELETE command, except that it can create gaps in your sequence.


How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
My blog at SQLKover.

MCSE Business Intelligence - Microsoft Data Platform MVP
Randheer
Randheer
Old Hand
Old Hand (326 reputation)Old Hand (326 reputation)Old Hand (326 reputation)Old Hand (326 reputation)Old Hand (326 reputation)Old Hand (326 reputation)Old Hand (326 reputation)Old Hand (326 reputation)

Group: General Forum Members
Points: 326 Visits: 166
Scenario Based Questions

Suppose you have the table having identity column.
You delete the last row from the table which having identity value suppose 10 and then insert a new row in table. The new identity value which will get inserted in the table will be the next value i.e. 11.
So the question is that from where sql server reads the old identity value 10 (as data already deleted) and generates the new identity 11 accordingly to insert into table


SQL Server interview Questions and Answers
http://sqlserverquest.blogspot.com

Randheer Singh

----------------------------------
CheckOut My Blog for SQL Server Realated Topics and Interview Questions for SSIS , SSRS and TSQL.

http://www.sqlserverquest.com/p/ssrs-interview-questions.html
http://www.sqlserverquest.com/p/ssis-interview-questions.html
http://www.sqlserverquest.com/p/tsql-interview-questions.html
SQLSmasher
SQLSmasher
Old Hand
Old Hand (359 reputation)Old Hand (359 reputation)Old Hand (359 reputation)Old Hand (359 reputation)Old Hand (359 reputation)Old Hand (359 reputation)Old Hand (359 reputation)Old Hand (359 reputation)

Group: General Forum Members
Points: 359 Visits: 104
One very common question asked by interviewers is:

CAST versus CONVERT in SQL Server
Phil Parkin
Phil Parkin
SSC Guru
SSC Guru (84K reputation)SSC Guru (84K reputation)SSC Guru (84K reputation)SSC Guru (84K reputation)SSC Guru (84K reputation)SSC Guru (84K reputation)SSC Guru (84K reputation)SSC Guru (84K reputation)

Group: General Forum Members
Points: 84936 Visits: 21667
SQLSmasher (2/10/2011)
One very common question asked by interviewers is:

CAST versus CONVERT in SQL Server


That is not a question!


Help us to help you. For better, quicker and more-focused answers to your questions, consider following the advice in this link.

If the answer to your question can be found with a brief Google search, please perform the search yourself, rather than expecting one of the SSC members to do it for you.

Please surround any code or links you post with the appropriate IFCode formatting tags. It helps readability a lot.
SQLSmasher
SQLSmasher
Old Hand
Old Hand (359 reputation)Old Hand (359 reputation)Old Hand (359 reputation)Old Hand (359 reputation)Old Hand (359 reputation)Old Hand (359 reputation)Old Hand (359 reputation)Old Hand (359 reputation)

Group: General Forum Members
Points: 359 Visits: 104
It is quite good question for initial telephonic interview. And you can give simple answer by
1. CONVERT is SQL speicific but CAST is ANSI standarised
2. CONVERT deal nicely with datetime using format, which is missing from CAST
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search