Interview Questions and Answers are now updated with the latest questions and answers. New Location: SQL Server Interview Questions and Answers.
Click here to get free chapters (PDF) in the mailbox
Thank you all for your appreciation about the my recent series of SQL Server Interview Questions and Answers. I enjoyed writing questions and answers. I have gotten many emails about complete series.
Top most requests were to collect series in one big post so they can be easily used. I was asked to provide links to download them so they can be printed and referred.
Another question I received is done I ask the same questions in interviews which I administrate. The answer is YES. Though, I have a few other questions, which I ask. All of them, I came up myself and answers are unique to questions and not available on-line. Well, long story short, I have compiled list of questions in one PDF. Please download them and use them in your next interview or just for reading purpose.
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.
Download SQL Server Interview Question and Answers Complete List
Complete Series of SQL Server Interview Questions and Answers
Introduction, Part 1, Part 2, Part 3, Part 4, Part 5, Part 6
SQL Server Interview Question and Answers Complete List Download
Other popular Series
SQL SERVER Database Coding Standards and Guidelines Complete List Download
SQL SERVER – Data Warehousing Interview Questions and Answers Complete List Download
Connect with me on Twitter.
Reference: Pinal Dave (https://blog.sqlauthority.com)
282 Comments.
hi sir thanks so much very good y articls..
i have one proble related to sql.
i have one table employee (Some Fields) are aslo in employee table..
but cant see my table how many are fields in table.
problem-
i want see the any Row records from the employee table.but not used to condition.(because User not saw the table details)
but user want see the any row records.
how to its possible.
so plz rep me…
regards
suresh kumar
(New Delhi)
Hello sir,your stuff is very useful for interveiws as well as normal knowledge gaining purpose.Is it that u have interview questions and answers for SQL Server only….can u plz add some .net inteview ques and ans also…I really need them along with SQL Server ques & ans.
Thanks
Kavita
hello sir
please provide guidence in sql server to gain knowledge
Hi
You list is very useful for interview. Can u pls add some SSIS or SSRS Questions also.
Hey Pinal, This is an awesome site and you are the GURU. Do you also have more insight on SSIS ? or Can you suggest some websites where I can start learning. I have worked on SQL Server 2000 a lot with DTS packages and stuff and did the same in 2005. But 2005 offers much more than DTS packages.
I small suggestion. Can you sort these messages in reverse so we get latest posts on top?
~ Rocky
hello sir really a very gud question..
Hi,
Can you please tell me some interview questions on SSRS & SSIS. If you can then it will be very helpful.
Thanks
Tushar
increase the price of all desks (in the item table) by 50% (use update)
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 tabel”
Can you please clear the ambiguty”
Thank You.
thanks alot man…………..it really helped me a lot………fine, keep doing things 4 ever so,it helps so many persons like me……….thanks once again………bye…….
Mind Blowing..It really helped me out in my project work.
Hi Mr.Pinal
First of all thanks a lot
Really it worked for me
Gopal
Add more content !!
Pinal, thanks man. Great stuff. I really appreciate your effort and enjoyed reading your Blog.
Help please..?
i tried to code that enable to transfer from the data in my local drive database to the network database to make network database updated to the new inputs but i got error i used this statement below..
here is my codes….
Dim conn As ADODB.Connection
Dim SQL As String
conn = New ADODB.Connection
conn.ConnectionString = “Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\pc1TSmobileDataCopyTSMobile.mdb;Persist Security Info=False;Jet OLEDB:Database Password=h1lt1″
conn.Open()
SQL = “Select into CopyTSMobile.dbo.TTMtransaction” & _
“Select FROM (’Provider=Microsoft.Jet.OLEDB.4.0;’,’Data Source=c:TSMobile.mdb;’,’User Id=;’,’Password=h1lt1;’,’SELECT FROM TTMtransaction where sync=0’)”
conn.Execute(SQL)
conn = Nothing
please help please how to fix this error..
The SELECT statement includes a reserved word or an argument name that is misspelled or missing, or the punctuation is incorrect.
i have also tried this one but still not…
Pinal please help…
Dim strSQL As String
Dim cn As New OleDb.OleDbConnection(“Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\ph-sumanTSmobileDataCopyTSMobile.mdb;Persist Security Info=true;Jet OLEDB:Database password=h1lt1”)
Dim cmd As New OleDb.OleDbCommand
cn.Open()
strSQL = “select into [CopyTSMobile.mdb.dpo.ttmtransaction] from [Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:tSMobile.mdb;Persist Security Info=False;Jet OLEDB:Database Password=h1lt1].[TSMobile.mdb.dpo.ttmtransaction],cn”
cmd.CommandText = strSQL
cmd.Connection = cn
cmd.ExecuteNonQuery() ‘this should create a copy of the table called Opportunity in the Access database
cn.Close()
here is the error in this batch of codes…
The SELECT statement includes a reserved word or an argument name that is misspelled or missing, or the punctuation is incorrect.
i tried a lot i never make this run…
Pinal Dave, please help me….
i want to the upgraded interview question for ms sql server 2005.
i need this urgently.
thanks
Animesh
Hi, is there a way to find the two salaries with the biggest difference amount between them, and then display both the salaries and the amount difference between them, all in one query( without using FETCH or TOP (Unfortunately I can’t use them, or any other newer MS Server SQL syntax for this project for some lame reason). Thanks for any help.
Hi Pinal,
I’m your latest fan. I’ll surely make a point to visit this blog again and again. I have my interview tomorrow and I’ve just found what I was looking for.
A great site, a great insight in your answers.
Thanks a billion for your efforts!!
Wish there are more people like you :)
Cheers,
Alexis
dear pinal bhai
iam working as a business analyst, iam a functional guy, i want to learn sql, please help me how can i lean in short period, reply me
regards
sanjeet