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

Click here to get free chapters (PDF) in the mailbox

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.

SQL SERVER - Interview Questions and Answers - Frequently Asked Questions - Introduction - Day 1 of 31 interview-500x284

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 (https://blog.sqlauthority.com)

Previous Post
SQL SERVER – Interview Questions and Answers – Frequently Asked Questions – Complete Downloadable List – Day 0 of 31
Next Post
SQL SERVER – Interview Questions and Answers – Frequently Asked Questions – Day 2 of 31

Related Posts

No results found.

48 Comments. Leave new

  • 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.

    Reply
    • Hi Pinal i have a question related to log shipping in 2012 web edition,

      Backup,copy job succeeded but restore job getting error like ” *** Error: Could not log history/error message.(Microsoft.SqlServer.Management.LogShipping) ***
      2015-03-10 09:40:21.41 *** Error: ExecuteNonQuery requires an open and available Connection. The connection’s current state is closed.(System.Data) *** ”

      Could you please help me to solve this issue……

      Reply
      • you would need to capture profiler to see what is the exact statement which is failing.

  • parasdoshi.com
    July 1, 2011 3:13 pm

    Great info-graphics!! + As always – truly amazing Post.

    Reply
  • Great Pinal,Looking forward for some real fun.

    Reply
  • Thats really great it will keep us updated and all information in a nutshell will be available.

    Reply
  • Rais Hussain
    July 3, 2011 11:17 am

    Awesome stuff which refreshes my concepts. Thanks to my favorite Pinal Dave.

    Reply
  • Rehan Sunasra
    July 3, 2011 8:45 pm

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

    Reply
  • woooooooooohooooooooooooooooooooooooooooooo

    Reply
  • That”s awesome Pinal…This will be really interesting

    Reply
  • 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?

    Reply
  • Hi,

    Sir,

    Exclent………………………

    Reply
  • Hello Sir,

    Good Stuff in simple and Lucid manner…..

    Reply
  • 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.

    Reply
  • John W. Rose
    July 15, 2011 9:26 pm

    Pinal Dave – You ROCK!!!!!!!!!!!!!! This is GREAT STUFF. THANKS!

    Reply
  • MrJoel Cimanes
    July 17, 2011 5:51 pm

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

    Reply
  • Great post, really appreciate your effort. it help me a lot.

    Again, thanks

    Ethan

    Reply
  • Himanshu Bhargav
    July 20, 2011 2:25 pm

    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

    Reply
  • 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

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

    Reply
  • 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

    Reply
  • 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

    Reply

Leave a Reply