SQL Server Interview Questions and Answers – Introduction

UPDATE : Interview Questions and Answers are now updated with SQL Server 2008 Questions and its answers. New Location : SQL Server 2008 Interview Questions and Answers.

Hello All,

Thank you all for sending request for Interview Questions and Answers. It begins from today. This is six part series. I will update this post once all the six parts are published.

Thank you to the regular reader (name not published as per request) who sent me new banner for this blog. I hope you all like it.

I have done my best to answer all the emails and comments I have received. Only those comments are published which are adding something more to original post.

I always welcome email/comments, whether you’re interested in talking about my projects, MS SQL SERVER, ColdFusion, Web Architecture, or have taken an online tutorial class of mine, or even have an event where you believe I’d be a great speaker or panelist. Or just feel free to say “hi” too.

Pinal Dave

Complete Series of SQL Server Interview Questions and Answers
SQL Server Interview Questions and Answers -Introduction
SQL Server Interview Questions and Answers – Part 1
SQL Server Interview Questions and Answers – Part 2
SQL Server Interview Questions and Answers – Part 3
SQL Server Interview Questions and Answers – Part 4
SQL Server Interview Questions and Answers – Part 5
SQL Server Interview Questions and Answers – Part 6
SQL Server Interview Questions and Answers Complete List Download

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

About these ads

218 thoughts on “SQL Server Interview Questions and Answers – Introduction

  1. Hi Pinal Dave,
    I am very excited to writ you. I like the Interview questions and answers. I like your site and i would like to be in touch with you as i am new in SQL server and i have a dream to make a career in it though i am not very good programmer.
    If i need any assistance i will write you personally. By the way where is your online tutorial class. I would love to take that.

    Thank you.

  2. Hi pinal

    Here i would like to ask you one question that is there any why in the query through i can generate the serial no. for the resulting records.

    I have faced this problem many time when i am going to bind the out if my query to any Control.

    I have to do it manually by looping our the resulted records using data table.

    thanks

    Rahul Patel

  3. Hi Pinal,
    Your Interview Questions are great!! My project will be finished on 20th of May and reading these questions and answers. I will use these questins for my Interview. I learnt so many things from these question-answers.
    Also have you got chance to make the documentation of SQL 2000 to SQL 2005 migration. Please let me know when you are done.

    Thank you again for your help.

    Regards
    Abi

  4. HI,

    Please send me SQL Server 2000 Interview Question ASAP

    Thanks & Regards

    Kale Ravikant

  5. Hi Pinal Dave,
    I am very excited to write about you. I like the Interview questions and answers. I like your site and i would like to be in touch with you as i am new in SQL server and i have a dream to make a career in it though i am not very good programmer.
    If i need any assistance i will write you personally. By the way where is your online tutorial class. I would love to take that.
    Please mail me about your online line tutorial Details
    Thank you.

  6. Hi Pinal,

    While searching on google regarding SQL Server 2005,
    I came across your site. And i find it really good in all way.
    The way you have put the concept, anybody who is new to
    DB can understand.

    As i’m new SQL Server 2005,I wanted to know more about it.
    The series of question and answer given above is Complete
    or you have more apart from this.
    If yes i would really like to have those.

    And i’ve a question which was asked in last interview and wanted to clear it before the next.

    How would you enhance the query in SQL Server 2005?

  7. Hi Pinal Dave,

    I have read the above messages. I am very much eager to read the SQL Interview Questions, because I want a Good Job in IT sector with a very good package. So, please send me your SQL Interview Questions and Answers. I hope, they will definitely help me to reach my goals.

    Thank you very much in advance
    Venki

  8. this web window is more educational for me . it provides me some basics about mysql. thanking you.
    plz . provide me interview questions along with basics of my sql.

    with regards
    sunil chaudhary
    field enigneer- accel frontline ltd.

  9. Hi………………….
    Dear I urgent need of SQL Server Interview Question. Please Send ……………………………….

  10. Hi All,

    Please read the original post before asking for SQL Interview Questions. I do not send them in email. They are already available on this site. They are freely available to download in PDF format. You just have to click on download link and download them.

    Regards,
    Pinal Dave (http://www.SQLAuthority.com)

  11. Hi Pinal,
    I am very excited to write about you. I like the Interview questions and answers. I like your site and i would like to be in touch with you as i am new in SQL server and i have a dream to make a career in it though i am not very good programmer.
    By the way where is your online tutorial class. I would love to take that.
    Please mail me about your online line tutorial Details
    Thank you.

  12. Hi Pinal,
    Nice work…. helpful questions.,, keep it up.
    A question….
    Is there any utilty which will give me list of the backup job failed for more than 2 days… I know we can find out that through backupfile, backupmediaset..
    But wanted to automate that process….for more than 100 servers and almost 1000+ databases.

    Planning to create a tool… somewhat like this…
    Pass Server Name as a parameter…
    a. Check for all available instance on that server.
    b. Check all the databases on each instance and
    c. Check the backupstatus of each of the DB.

    To check these manually will take hell lot of time so want to automate this process. Can you suggest anything?
    Thanks in Advace,
    -Bhupendra

  13. Hi Pinal,

    requsted to u.
    im completed my B.Tech from JNTU.
    n looking fr S/W PROGRAMMER in SQL-2000
    Plz send the SQL question n answers to my id
    as soon as possible.
    especially im looking fr ORACLE programmer

  14. Hi Pinal Dave,
    I am very happy to write you. I would like to know the Interview questions and answers. I would like to be in touch with you online, as i am new in SQL server and i have a dream to make a career in it though i am not very good programmer.
    I need your assistance in case if i required, i will write you personally when ever i required. Can u help me to find ur online tutorial class. I would like to take part in that.

    Thank you.

  15. Hi Dave,

    I have 2+ yrs experience in SQL DBA, now i’m looking for a change. I started to attend interview after 2 years. So i would like to know the latest interview ‘Q’ Bank. Practically I’m very strong, but if i get ur Q/A that would be fine.

    Thank You

  16. Hi Pinal,

    While searching on google regarding SQL Server 2005,
    I came across your site. And i find it really good in all way.
    I ve got one que.
    How to create composite primary key? if not then how to acess the records from detail table.

    thanku

  17. i want to ask u that after learning sql , which type of jobs i can do? coz now i m learning dotnet course so i mquite confused please do reply for this
    thank you.

  18. Hi PINAL!

    I find your interview questions very interseting. Most important thing is that all questions are answered in brief and all answers are very easy to unsersatnd.

    I am a Software Engineer, working in SQL Server 2005 & Reporting Services environment. I want to explorer my skills in SQL Server Database. Please send me more questions with anserws.

    For any assistance in future I’ll write you to get answer.
    Regards!

    Hari

  19. Hi,

    All information are very nice and if you put bit more regarding the indexes ,i think helpful to everyone .

    Thanks and Regards,
    Mohananu

  20. Hi

    I find your interview questions very interseting. Most important thing is that all questions are answered in brief and all answers are very easy to unsersatnd

    pl. send me the interview questions

    regds
    siva

  21. hi, please send me the sql queries and documentations,
    i m a soft. eng. and struggling for finding a good opportunity.

  22. I had an interview last week, They asked me lot of sql questions. I was able to answer eveything. These sql questions were really helpful. I also got the job. GREAT WEBSITE!!!!!

  23. I m so nervous bcause i have interview. But after getting these question i m feeling so confident. So thanks to Mr. Pinalev

  24. Hi Pinal,

    I would like to know about what is exact different between BCP and DTS on SQL Server becuase this is discuss happened at one of my technical interview so please reply me

    Thanks

  25. I tryed to alter a table but got error 8115.

    this is what I used:
    alter table XXX alter column XXX decimal (5,4) not null
    I used SQL server

    here was the table decimal (5,2) not null.
    The filling was as 99999,99 and should be 99999,9999

    Is there anybody who knows how I can get this right?

    kind regards,
    Willem

  26. Hi,
    Great work.
    I have finished my B.Tch It and working on SQL Server.
    I am in search of a new job now
    kindly help me outSend my interview question

  27. Hi Priya,

    now i am preparing for interview, can u have any interview question like querys , if it is posible able to send me

    thanks for this help

  28. Hi, please send me a important interview sql sever faq

    and practice realtime examplese if u have ,
    tkx

    venkatesan ck

  29. Hi Dave,

    Thanks for sharing your SQL knowledge with new DBAs. I am amazed by your organization of this site. I like to take your online tutorial or mentoring. Thanks in advance.

    Regards,

    Milon
    Hawaii, USA

  30. Pingback: SQL SERVER - Database Interview Questions and Answers Complete List Journey to SQL Authority with Pinal Dave

  31. Hi Dear,

    I am in a great need of SQL Server related really good stuff to practice my self. Would you mind sending all that for me…

    Thanks
    Esn

  32. Hello Sir,

    Dharmesh here,

    i m a beginner of sql server.

    i need your help to create stored procedure, trigger, indexing, function, t-sql and concept of normalization and de-normalization.

    please do needful.

    regards,
    dharmesh shah

  33. Hello sir,
    pooja here

    Thanku so much for your great help.
    I got here a lots of sql server question.even different,some site post same question again and again.

    plz send me different and hard question based on sql server 2005.

    thanks

  34. Plz send me important sql server 2005 interview question. I have good knowledge on sql. I am looking for good question.

    Thanks

  35. hi, this is shiva, plz send me the FAQs on SQL server, which are asking very frequently in the interviews for my interview purpose.

    It could be very helpful for me. do the needful.

  36. Dear Pinal,

    Why BCP is faster than DTS? This is important question. We all
    should know as a SQL DBA?

    Thanks,
    Khondaker

  37. Hi Pinal,

    I really appreciate your knowledge and your effort which you put for others.

    Well it wud be great if I can get your inteview questions along with the answers.

    Thanks N Advance,
    Priya

  38. Manjunath Patil

    Hi Pinal Dave,
    I am very excited to writ you. I like the Interview questions and answers. I like your site and i would like to be in touch with you as i am new in SQL server and i have a dream to make a career in it though i am not very good programmer.
    If i need any assistance i will write you personally. By the way where is your online tutorial class. I would love to take that.

    Thank you.

  39. Hi, I saw your site in google. its very fine.

    Please send me the Interview Questions Asked by the Companies of Sqlserver2000 and Sqlserver2005.

    Regards,
    RAVIKUMAR,
    Bangalore

  40. Hi

    I would like to get sql server complete interview questions and answers
    Please do send it asap

    Regards
    sunil

  41. Hi Pinal,

    I am a beginner in SQL.

    So it would be of great help to me if you can send me some questions on T-SQL (including queries, sp’s , etc) for the Northwind and Pubs database that ships with SQL Server. Also some questions meant for an SQL Programmer, and not a DBA.

    Thanks in advance,
    Jaideep.

  42. hi,
    v.v.v.v.v. important
    i have a query, but m not sure whether u will see this comment and answer to my question,…

    this has been asked me in SQL interview,

    A view has been created from a Single table…
    by mistake this view has been dropped, which has been created with very complex queries…and there is no back kept for this view script….

    so how we can protect this view from dropping…

    *it is not the assigning a priviledge to the user…
    *it is something to do with protecting view so that unless the table (from which view is derived) is dropped, the view can not b dropped….

  43. i m mba with finance spl . i need your help i want know some mejore point of interview q n ans.
    i need introduction n all about the mba questions

  44. Hi Pinal,
    I have been working in Sql server 2005.While trying to detach the database the following error has been occured.

    1.Msg 926,Level 14,State 1,Line 1
    Database ‘msdb’ cannot be opened.It has been marked SUSPECT by recovery.See the Sql server errorlog for more information.
    Problems recording information in the msdb..suspect_pages table were encountered.
    This error does not interfere with any activity except maintenance of the suspect_pages table.Check the error log for more information.

    Please guide me to rectify this problem.

    Regards,

    Sukumar.K

  45. I have worked in sqlserver 2005.

    After detaching the database(which i have used in sql server2005) i tried to attach the database in sql server 2000.

    while attaching this error has been occured.

    Server: Msg 602, Level 21, State 50, Line 1
    Could not find row in sysindexes for database ID 10, object ID 1, index ID 1. Run DBCC CHECKTABLE on sysindexes.

    Connection Broken

    Can you please guide me to rectify this problem.

    Regards,

    Sukumar.K

  46. Hi Pinal Dave,
    I am very excited to writ you. I like the Interview questions and answers. I like your site and i would like to be in touch with you as i am new in SQL server and i have a dream to make a career in it though i am not very good programmer.
    If i need any assistance i will write you personally. By the way where is your online tutorial class. I would love to take that.

    Regard’s

  47. hi

    I find your interview questions very interseting. Most important thing is that all questions are answered in brief and all answers are very easy to unsersatnd

    pl. send to my email objective type of interview questions and answer

    i am waiting for your reply

    regds
    raja

  48. comming friday i had an interview in ibm, for 10g database administrator, i neeed an interview question please help me

  49. Hello pleas send me the questions fro SQL Server and their answers which could be asked in the Interview.

    Thanks and regards,
    Sameer

  50. i’m completed my M.C.A from Bharathidasan University
    looking fr S/W PROGRAMMER in SQL-2000
    Plz send the SQL question n answers to my id
    as soon as possible.

  51. What you need ? Do you need SQL Server Interview Questions or Oracle 10g Interview Questions? I think you need Oracle 10g. To interview Oracle DBA you do need to know Unix and Oracle ? Lots of web site I think you can find there.

  52. What is reason for Transaction Log failure? How do we resolve the problem? Give me solutions please.

    Thanks,

  53. hi pinal…
    hwz u… thanks for the gr8 work that you have done on your blog….

    will soon be coming back to you with some questions

    well my first ques is on types of User defined functions.

    do provide me with a brief idea…

    thanks n regards

  54. Hi,
    Please can you give me some senarios about backup/restore/Log shipping/High Avalability/Database Mirroring.

    thanx in advance.

    kanj

  55. Hi….

    I just heard about this site, Its really interesting.
    Can you please help out Sql interview Questions to my Id.
    As iam new to this I would like to learn in depth.

    Thanks in Advance.

  56. sir,
    please give me the information about to find the nth level of salary.

    How will u write the query

  57. Hi Friend,
    I am in need of your questions and answer

    because i want to be a master in SQL Server

    thanks and regards
    James

  58. Hi,
    Pinal Bhai,
    While I am searching q/a in google i come across u r site & i am facing very problem in sql q/a in interview so can u mail me all sql Q/A of interview so i can clear my Interview. Thanks In advance

    bye
    T c

  59. Hi,
    Sir,
    plz give me list of question and answer set
    for basic. coz i’m totaly new in sql.
    So want to learn from basic.

    Thanks in advanced.

  60. Hello sir
    I am Nagna.I hav some doubts can u short it out.
    1. What is sql injection
    2.what are page split
    3.How to run sql server in command line
    If u hav some interview questions for freshers than plz mail me.

  61. Hi Pinal,

    You are helping others is really good.

    Can you please let me know, that how to use current index scan and current index seek?

  62. hai, I m vikas
    plz send me common question,which may be ask in interview of sql server2005.

    Thanks.

  63. hi pinal ,can you please send me all the interview queation that can be ask in interview thanks,,,,,

  64. Hi,

    I am a SQL SERVER DBA .I am working in a Multinational Company as a contractual employee. I have three years of work Experience and i am looking for a change……….

    Thanks & Regards
    Dhritiman Banerjee

  65. hi
    i m working in ISPL (IT company) as contractual employee. 1.5yrs experience.

    please send me sql and pl/sql interview question and asp.net with c# interview question.

  66. hai,

    How to retrieve one last row from the single table, in Sql server.

    I tried with the query as follows:

    Select * from(Select top 1 * from order Order By orderdate DESC) AS last

    Select Top 1 * from oder order by orderdate DESC;

    But it is showing error like:

    “You cannot use the orderby clause in the derived table”

    Can you please clear the ambiguty

    Thank You.

  67. Hi,

    I am software developer having experience of 3 years.
    I am interested in your question bank.
    please send me sql and pl/sql interview question and asp.net with c# interview question.

    Thank You.

  68. send to me an interview questions,i have skills on accounting and finance,and i have got opportunity for interview on bank firm.please

  69. Hi,

    I am software Engineer having experience of 2 years.
    I am interested in your question bank.
    Pls Send me SQL And Pl/SQL Interview questions and Answers
    and Asp.net With C#

    Thank You.

  70. Hi Pinal,
    I am a software developer looking for new opening now.
    plz send me common question,which may be ask in interview of sql server2005.

    Thanks,
    Roopa

  71. Hi Pinal,
    I am a software developer looking for new opening now.
    plz send me common question,which may be ask in interview and Objective type question also.
    Thanks,
    Rajesh

  72. Hi,

    please send me basic & intermediate level interviews question.
    And sir if can be possible answers with them then please send
    also.

    Thanx with Regard

    Prince Saurabh

  73. Hey Dave…

    I am an Oracle DBA. Interested to learn sqlserver. If possible please provide the study material pdfs.

    Thanks inadvance,
    Kusuma

  74. hi dave..
    am interested to sql server …if possible reply me…
    how to select second max value of table
    thank u ..

  75. Hi,
    This wesite is really fantastic. post and comments links are not working.
    Kindly answer the below questions abou SQL:-
    1. How to update the content of the table, with tedious condition?
    2. There are two tables C1(a1, a2) and C2(a3,a4), how to write a query to create one new table let say C3 with the column of (a1,a2,a3,.a4)?
    3. Consider student table contain name of the subjects as sub1, sub2,sub3 and average marks. Write the query to retrieve the name of the student which got highest marks in sub1?
    4. Consider an account table contains uid, password, name and activation field. Here the activation fields contain the value 0. Now write the query to make the activation field value to 1 and retrieve the row?
    Plz send me those answers to my mail id.

    Thanks
    Sarita

  76. hi Pinal,

    yr site is very helpful.
    i m .net programmer but as u know sometime interviewer asks for the queries….
    i m looking for queries as a tutorial.
    so,we can practice that before facing interviews.

    thanx.

  77. Hello Sir
    I want sql and pl/sql objective type questions and also questions that are asked in interviews,also give me information where i will get good IT job oppertunities.

  78. hi
    i am doing six weeks training on oracle 9i module’1′ can you pls tell me the questions that were previously asked in the online test……………..
    &
    also tell me the job scopes for a b.tech students in database…………

  79. hi,
    this radhika monday i have an interview that,s why i need
    an interview questions in SQL Server.
    plz send.

  80. Hi,

    You are doing a valuable need and help for a better society. Thanks for Keeping everyone’s spirits high.

    Keep Going.
    Anil

  81. I would like to know your inverview questions with answer as if now i’m new for SQL Server DBA…

    Plz send the full details of you

    Thanks & Regards

  82. Hi….

    I just heard about this site, Its really interesting.
    Can you please help out Sql interview Questions to my Id.
    As iam new to this I would like to learn in depth.

    Thanks

  83. Hello Pinaldave

    Can you send me a small type project work on SQL SERVER2005 and interview questions

    Thanks
    zabeer

  84. hi Pinaldave

    i am abhay & have completed MCA . i am serch ob in oracle or sql plateform .

    i want to do a oracle or sql certification . can u guide me which paper to prepare and books also

    there two types certification now which track to use (sql developer or DBA)

    plz help me

  85. Hi sir,

    i had completed my MCA.i learn the Testing Tools course.now i am searching job in software testing. i want to know the data base like sql server.

    pls tell me the diff between SQL server and ORACLE.

    i want to know the all faq’s of SQL server.pls send me the list of questions to my id

    Regards,
    Hemanth.k

  86. Hi sir,

    i had completed my MCA.i learn the sql and c#.net course.now i am searching job in software engenering. i want to know the data base like sql server.

    pls tell me the diff between SQL server and ORACLE.

    i want to know the all faq’s of SQL serverand query.pls send me the list of questions to my id

    Regards,
    Ramesh

  87. I had completed my MCA.I learn the sqlserver and c#.net course.now i am searching job in software engenering. I want to know the data base like sql server.

    I want to know the all faq’s of SQL server and queries.pls send me the list of questions to my ID.

  88. I had completed my MCA.I learn the sqlserver and c#.net course.now i am searching job in software engenering. I want to know the data base like sql server.

    I want to know the all Interview Q qnd A of SQL server and queries.pls send me the list of questions to my ID.

    thanks

    Gowrisankar Krishnamoorthy
    Gobicettipalayam. TamilNadu.IN

  89. Hello

    Sir I am a softwer developer works in Bangalore.
    I see your question and intrested by you. so please you send more question and answer about sql server.

    thanks sir

    good night

  90. Hi Pinal,
    This is Surendra Working as ETL Developer ,I am very much intrested to learn SQL Programing language pls give me the Guide lines

  91. Hi ,
    Can you please send me the sql question and answers as I want to shift from my current company and willing to prepare myself for further interviews…Thanks a lot

  92. Pingback: SQL SERVER – Weekly Series – Memory Lane – #025 | SQL Server Journey with SQL Authority

Comments are closed.