SQL SERVER – Interview Questions and Answers – Frequently Asked Questions – Introduction – Day 1 of 31

SQL Server Interview Questions and Answers
Print Book Available (207 Pages) | Sample Chapters

List of all the Interview Questions and Answers Series blogs

Posts covering interview questions and answers always make for interesting reading.  Some people like the subject for their helpful hints and thought provoking subject, and others dislike these posts because they feel it is nothing more than cheating.  I’d like to discuss the pros and cons of a Question and Answer format here.

Interview Questions and Answers are Helpful

Just like blog posts, books, and articles, interview Question and Answer discussions are learning material.  The popular Dummy’s books or Idiots Guides are not only for “dummies,” but can help everyone relearn the fundamentals.  Question and Answer discussions can serve the same purpose.  You could call this SQL Server Fundamentals or SQL Server 101.

I have administrated hundreds of interviews during my career and I have noticed that sometimes an interviewee with several years of experience lacks an understanding of the fundamentals.  These individuals have been in the industry for so long, usually working on a very specific project, that the ABCs of the business have slipped their mind.

Or, when a college graduate is looking to get into the industry, he is not expected to have experience since he is just graduated. However, the new grad is expected to have an understanding of fundamentals and theory.  Sometimes after the stress of final exams and graduation, it can be difficult to remember the correct answers to interview questions, though.

An interview Question and Answer discussion can be very helpful to both these individuals.  It is simply a way to go back over the building blocks of a topic.  Many times a simple review like this will help “jog” your memory, and all those previously-memorized facts will come flooding back to you.  It is not a way to re-learn a topic, but a way to remind yourself of what you already know.

A Question and Answer discussion can also be a way to go over old topics in a more interesting manner.  Especially if you have been working in the industry, or taking lots of classes on the topic, everything you read can sound like a repeat of what you already know.  Going over a topic in a new format can make the material seem fresh and interesting.  And an interested mind will be more engaged and remember more in the end.

Interview Questions and Answers are Harmful

A common argument against a Question and Answer discussion is that it will give someone a “cheat sheet.” A new guy with relatively little experience can read the interview questions and answers, and then memorize them. When an interviewer asks him the same questions, he will repeat the answers and get the job. Honestly, is he good hire because he memorized the interview questions? Wouldn’t it be better for the interviewer to hire someone with actual experience?  The answer is not as easy as it seems – there are many different factors to be considered. If the interviewer is asking fundamentals-related questions only, he gets the answers he wants to hear, and then hires this first candidate – there is a good chance that he is hiring based on personality rather than experience.  If the interviewer is smart he will ask deeper questions, have more than one person on the interview team, and interview a variety of candidates.  If one interviewee happens to memorize some answers, it usually doesn’t mean he will automatically get the job at the expense of more qualified candidates.

Another argument against interview Question and Answers is that it will give candidates a false sense of confidence, and that they will appear more qualified than they are. Well, if that is true, it will not last after the first interview when the candidate is asked difficult questions and he cannot find the answers in the list of interview Questions and Answers.  Besides, confidence is one of the best things to walk into an interview with!

In today’s competitive job market, there are often hundreds of candidates applying for the same position.  With so many applicants to choose from, interviewers must make decisions about who to call back and who to hire based on their gut feeling.  One drawback to reading an interview Question and Answer article is that you might sound very boring in your interview – saying the same thing as every single candidate, and parroting answers that sound like someone else wrote them for you – because they did.  However, it is definitely better to go to an interview prepared, just make sure that you give a lot of thought to your answers to make them sound like your own voice.  Remember that you will be hired based on your skills as well as your personality, so don’t think that having all the right answers will make get you hired.  A good interviewee will be prepared, confident, and know how to stand out.

My Opinion

A list of interview Questions and Answers is really helpful as a refresher or for beginners. To really ace an interview, one needs to have real-world, hands-on experience with SQL Server as well. Interview questions just serve as a starter or easy read for experienced professionals. When I have to learn new technology, I often search online for interview questions and get an idea about the breadth and depth of the technology.

Next Action

I am going to write about interview Questions and Answers for next 30 days. I have previously written a series of interview questions and answers; now I have re-written them keeping the latest version of SQL Server and current industry progress in mind. If you have faced interesting interview questions or situations, please write to me and I will publish them as a guest post. If you want me to add few more details, leave a comment and I will make sure that I do my best to accommodate.

Tomorrow we will start the interview Questions and Answers series, with a few interesting stories, best practices and guest posts. We will have a prize give-away and other awards when the series ends.

List of all the Interview Questions and Answers Series blogs

Reference: Pinal Dave (http://blog.SQLAuthority.com)

About these ads

74 thoughts on “SQL SERVER – Interview Questions and Answers – Frequently Asked Questions – Introduction – Day 1 of 31

  1. That’s an awesome news Pinal. 100 years!!! I was really thinking abou you writing something of this sort. You could have notices that I have visited your SQL interview questions post in the past fee days. Am interviewing lot of people now a days and my interviews are lasting for about a hour and half. Every person we interview if asked says that out of 10 their rating is 6 or 7 in SQL but none of them knows many of the SQL server parts/components at all. So it’s really hard to judge. Really appreciate ur efforts in this.

  2. Pingback: SQL SERVER – Interview Questions and Answers – Frequently Asked Questions – Complete Downloadable List – Day 0 of 31 Journey to SQLAuthority

  3. Pingback: SQL SERVER – Interview Questions and Answers – Frequently Asked Questions – Day 2 of 31 Journey to SQLAuthority

  4. Pingback: SQL SERVER – Interview Questions and Answers – Frequently Asked Questions – Day 3 of 31 Journey to SQLAuthority

  5. That’s a great news and good stuff to come Pinal which will really help the developers to go through the fundamentals. Cheers…………

  6. Pingback: SQL SERVER – Interview Questions and Answers – Frequently Asked Questions – Day 4 of 31 Journey to SQLAuthority

  7. Pingback: SQL SERVER – Interview Questions and Answers – Frequently Asked Questions – Day 5 of 31 Journey to SQLAuthority

  8. Pingback: SQL SERVER – Interview Questions and Answers – Frequently Asked Questions – Day 6 of 31 Journey to SQLAuthority

  9. Pingback: SQL SERVER – Interview Questions and Answers – Frequently Asked Questions – Day 7 of 31 Journey to SQLAuthority

  10. Pingback: SQL SERVER – Interview Questions and Answers – Frequently Asked Questions – Day 8 of 31 Journey to SQLAuthority

  11. Pingback: SQL SERVER – Interview Questions and Answers – Frequently Asked Questions – Day 9 of 31 Journey to SQLAuthority

  12. Pingback: SQL SERVER – Interview Questions and Answers – Frequently Asked Questions – Day 10 of 31 Journey to SQLAuthority

  13. Pingback: SQL SERVER – Interview Questions and Answers – Frequently Asked Questions – Day 11 of 31 Journey to SQLAuthority

  14. Pingback: SQL SERVER – Interview Questions and Answers – Frequently Asked Questions – Day 12 of 31 Journey to SQLAuthority

  15. Hi Sir,
    I am a developer lot of question asked to me which is DBA level question
    eg:
    what is transformation?
    what is linked server ?
    with-encription method and how can i decript it?
    job scheduling?

  16. Pingback: SQL SERVER – Interview Questions and Answers – Frequently Asked Questions – Day 13 of 31 Journey to SQLAuthority

  17. I agree you can learn from these questions. Although, some of the questions you get asked in an interview as a developer or DBA are just funny, and you can tell that the person asking the question has never worked with the technology that they are asking you about.

  18. Pingback: SQL SERVER – Interview Questions and Answers – Frequently Asked Questions – Day 14 of 31 Journey to SQLAuthority

  19. Pingback: SQL SERVER – Interview Questions and Answers – Frequently Asked Questions – Day 15 of 31 Journey to SQLAuthority

  20. Pingback: SQL SERVER – Interview Questions and Answers – Frequently Asked Questions – Day 17 of 31 Journey to SQLAuthority

  21. Thanks for this information.. This will be a great help for me as a graduating student in IT.. I’ll read this often..

  22. Pingback: SQL SERVER – Interview Questions and Answers – Frequently Asked Questions – Day 18 of 31 Journey to SQLAuthority

  23. Pingback: SQL SERVER – Interview Questions and Answers – Frequently Asked Questions – Day 20 of 31 Journey to SQLAuthority

  24. Hi Dave,

    Thanks for the great post & Interview Questions :)

    would need your help regarding some of important questions asked by interviewers.

    How to manage Large Database objects.
    How would i design a database where it could be in terabytes and a table could have more than 20 gb of data and how would i optimize.
    Database modeling
    How would you optimize the sql queries.
    What is the best approach to transfer large data from one table to another table on some event(triggers/BCP/Replication/SSIS)
    real- time database management

    so please start the series of questions for more experienced SQL developers.
    Hope you find these as valuable approach to begin with.

    Many Thanks for your reply

    Himanshu Bhargav

  25. Hi Pinal,

    When I give an interview, I confidently give answers, but sometimes what happens is some questions which are practical based and I give those answers, sometimes it happens that I give 80% of the answers correct, and feels confident that I will clear interview, but I dont get a call back. So that breaks my confidence. Is it something that interviewer expects 100% answers correct?

    Thanks,
    Samit

  26. Pingback: SQL SERVER – Interview Questions and Answers – Frequently Asked Questions – Data Warehouseing Concepts – Day 21 of 31 Journey to SQLAuthority

  27. Pingback: SQL SERVER – Interview Questions and Answers – Frequently Asked Questions – Data Warehouseing Concepts – Day 22 of 31 Journey to SQLAuthority

  28. Pingback: SQL SERVER – Interview Questions and Answers – Frequently Asked Questions – Data Warehouseing Concepts – Day 23 of 31 Journey to SQLAuthority

  29. Great effort. I like the analysis old guys or experience guys some time slip basic definations only due to specific nature of job.

  30. Pingback: SQL SERVER – Interview Questions and Answers – Frequently Asked Questions – Data Warehouseing Concepts – Day 24 of 31 Journey to SQLAuthority

  31. Pingback: SQL SERVER – Azure Interview Questions and Answers – Guest Post by Paras Doshi – Day 25 of 31 Journey to SQLAuthority

  32. Pingback: SQL SERVER – Interview Questions and Answers – Guest Post by Malathi Mahadevan – Day 26 of 31 Journey to SQLAuthority

  33. how to optimize this query……….please healp

    USE [SD-DATALOADER]
    GO
    /****** Object: StoredProcedure [dbo].[sp_InsertReceivedFileInfo] Script Date: 07/26/2011 17:17:08 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    ALTER Proc [dbo].[sp_InsertReceivedFileInfo]
    ———————Created By: Shriman Narayan Pandey——————————-
    ———————Dated: 25Th July 2011——————————————–
    @FileType varchar(100),
    @FileName varchar(100),
    @FacilityCode varchar(5)
    As
    Begin
    DECLARE @DtFile1 varchar(10)
    DECLARE @DtFile2 varchar(10)
    SELECT @DtFile1=Convert(varchar,[FileDate],112)
    FROM [File Monitor](NOLOCK)
    WHERE FileType=@FileType and FacilityCode=@FacilityCode
    and Received=’N’ and DaysElapsed>0
    SET @DtFile2=left(@FileName,8)
    IF(@DtFile1 is not null)
    BEGIN
    IF (@DtFile1=@DtFile2)
    BEGIN
    —-When Old file will received
    insert into [Daily Files] values(GETDATE(),@DtFile2,@FileType,@FileName,’Y’)
    END
    ELSE
    BEGIN
    — When Old Missing file is not received but New file for the current date is received
    IF NOT EXISTS (SELECT 1 FROM [Daily Files](NOLOCK) WHERE CONVERT(VARCHAR,FILEDATE,112)=@DtFile1 AND FileType=@FileType AND Received=’Y’)
    BEGIN
    insert into [Daily Files] values(GETDATE(),@DtFile1,@FileType,’NULL’,’N’)
    END
    insert into [Daily Files] values(GETDATE(),@DtFile2,@FileType,@FileName,’Y’)

    END
    END
    ELSE
    BEGIN
    insert into [Daily Files] values(getdate(),@DtFile2,@FileType,@FileName,’Y’)
    END
    End

  34. how to optimize this query……….please healp

    USE [SD-DATALOADER]
    GO
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    ALTER Proc [dbo].[sp_InsertReceivedFileInfo]
    @FileType varchar(100),
    @FileName varchar(100),
    @FacilityCode varchar(5)
    As
    Begin
    DECLARE @DtFile1 varchar(10)
    DECLARE @DtFile2 varchar(10)
    SELECT @DtFile1=Convert(varchar,[FileDate],112)
    FROM [File Monitor](NOLOCK)
    WHERE FileType=@FileType and FacilityCode=@FacilityCode
    and Received=’N’ and DaysElapsed>0
    SET @DtFile2=left(@FileName,8)
    IF(@DtFile1 is not null)
    BEGIN
    IF (@DtFile1=@DtFile2)
    BEGIN
    —-When Old file will received
    insert into [Daily Files] values(GETDATE(),@DtFile2,@FileType,@FileName,’Y’)
    END
    ELSE
    BEGIN
    — When Old Missing file is not received but New file for the current date is received
    IF NOT EXISTS (SELECT 1 FROM [Daily Files](NOLOCK) WHERE CONVERT(VARCHAR,FILEDATE,112)=@DtFile1 AND FileType=@FileType AND Received=’Y’)
    BEGIN
    insert into [Daily Files] values(GETDATE(),@DtFile1,@FileType,’NULL’,’N’)
    END
    insert into [Daily Files] values(GETDATE(),@DtFile2,@FileType,@FileName,’Y’)

    END
    END
    ELSE
    BEGIN
    insert into [Daily Files] values(getdate(),@DtFile2,@FileType,@FileName,’Y’)
    END
    End

  35. Pingback: SQL SERVER – Interview Questions and Answers – Guest Post by Rick Morelan – Day 27 of 31 Journey to SQLAuthority

  36. Great one, but i have one question over here what about those interviewer who only want to listen which they know about the question, if you explain question according you they are not satisfied..

  37. Pingback: SQL SERVER – Interview Questions and Answers – Guest Post by Feodor Georgiev – Day 29 of 31 Journey to SQLAuthority

  38. Pingback: SQL SERVER – Interview Questions and Answers – Guest Post by Jacob Sebastian – Day 30 of 31 Journey to SQLAuthority

  39. Pingback: SQL SERVER – The Difficult Interview Question – Moment of the Life – Day 31 of 31 Journey to SQLAuthority

  40. gr8 stuff Pinal! Exactly what you promised in the introductory note on Day 1.. Helps both the interviewer and the interviewee..and a very speedy refresher for some must-know questions asked in SQL Server..thanks a ton!

  41. Pinal,

    Great work

    Continue the good work

    I find your way of explaining SQL issue very simple up to the point

    Do You know of any developer with knowledge in Retalix Storeline ver 8.7.3.28 ?

    congratulations

  42. I NEED YOUR HELP
    ANY IDEA ANY SOLUTION

    SCENARIO:
    An organization suppose Jason industries have its branches in different regions of country. In each branch there is a local database where they maintain their data locally. Suppose one branch in New York, one in Washington, one in Texas.
    There is a main database in the main branch of the organization. At the end of each week or month each branch submits their data to the main database. I can say that they synchronize there data in the end of week or month. Note that each branch has its local database where data is kept in disconnected mode from main database. Only at end of each week or month the whole data of every branch is submitted to the main database..
    My question is that is it possible? If yes, what this concept is called? And where from can I get help on this topic?

  43. Really Thanks for all these interview questions sir. Also does this posts contain the detailed answers that are their in the hard copy book? Please advise

  44. Hi Pinal,
    I have one image file (object) and want to use this single image in multiple crystal report or SSRS report. I want to store this image at one location and the reports will use that. Is it possible? How can we do this?

  45. I am indebted to you for this blog and your sql pdf interview question answer file,in my small sql professional career of 2 yrs i followed your blog and pdfs and got a job offer.I am currently looking for a job again and i hope your pdf and my preparation will come to my rescue.Keep up the great work.

    • If you are having two servers on a network, a linked server must be created. However if you have two instances on the same server you can write the sql command shown.
      select * into Database2.Table1 from Database_1.[dbo].[Table1]

      Write back if it doesn’t work.

  46. Pingback: SQL SERVER – Weekly Series – Memory Lane – #036 | Journey to SQL Authority with Pinal Dave

  47. I want consolidate of numbers in SQL …For an example I having number like
    1,2,3,4,.6.7.8.9,12,13,14,16,18,20
    then I want the result as
    1-4,6-9,12-14,16,18,20
    How to achieve it please help me

  48. Pingback: SQL SERVER – Interview Questions and Answers – Guest Post by Nakul Vachhrajani – Day 28 of 31 | Journey to SQL Authority with Pinal Dave

  49. One of the major problems with interview questions is that the “test” is created by people who don’t know what in the world they are doing, when it comes to constructing a valid test. Geeks have no clue on how to construct test, they usually have no training at all in how to properly create a test that will truly test one’s ability for a particular job. I have been asked some real off the wall questions and when asked if these issues are encountered on the job, they say, “no”. The questions wind up being some geeks favorite techie question that have nothing to do with the job. Can’t tell you how many times this has happened.

    If someone is really interested in finding someone to help them (the real goal of any interview) and they choose to go the academic question and answer test method, then they need to test their test with proper validation methods and they would probably be surprise at the results!

    There are several validation tests, such as:
    Convergent
    Non-Concurrent
    Predictive
    Face, etc.

    Look them up if you want more details.

    If geeks create a test, then they should be able to administer that test to a cross section of WORKING developers and see what the average would be. I took a “professionally” prepared SQL test, which I passed, but found that the average rate of passing was only 40 %. And I know why, even in that “professionally” prepared test there were irrelevant questions on things I have never used in 20 years of professional SQL development! Imagine that, only 40 %.

    If you take any so call SQL tests created by Geeks who have no training in testing, then you can imagine what the percent of passing would be if they do proper validation tests.

    This is one of my major complaints on interview tests/questions created by fellow geeks. I guess since I have an education background, which included how to create tests, this then is particularly annoying!

    Anyway, thought I would add a new twist to the discussion on questions/tests for interviews.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s