Download SQL Server 2008 Interview Questions and Answers Complete List
Interview is very important event for any person. A good interview leads to good career if candidate is willing to learn. I always enjoy interview questions and answers series. This is my very humble attempt to write SQL Server 2008 interview questions and answers. SQL Server is very large subject and not everything is usually asked in interview. In interview what matters the most is conceptual knowledge and learning attitude.
I have listed all the series in this post so that it can be easily downloaded and used. All the questions are collected and listed in one PDF which is here to download. If you have any question or if you want to add to any of the question please send me mail or write a comment.
SQL SERVER – 2008 – Interview Questions and Answers – Part 1
SQL SERVER – 2008 – Interview Questions and Answers – Part 2
SQL SERVER – 2008 – Interview Questions and Answers – Part 3
SQL SERVER – 2008 – Interview Questions and Answers – Part 4
SQL SERVER – 2008 – Interview Questions and Answers – Part 5
SQL SERVER – 2008 – Interview Questions and Answers – Part 6
SQL SERVER – 2008 – Interview Questions and Answers – Part 7
SQL SERVER – 2008 – Interview Questions and Answers – Part 8
Download SQL Server 2008 Interview Questions and Answers Complete List
Reference : Pinal Dave (http://blog.SQLAuthority.com)




Well done, it must took you a good while to write these questions for the greater good
I was wondering when the interview articles will finish, so I can print them double-sided
now with the PDF, problem solved.
Many thanks Pinal, from Canada
Jerry Hung,
You are welcome.
Regards,
Pinal Dave
Hi Pinal ,
i want to know how to Insert Excel file in binary format in perticular one Collum of sql Table.
I have to design a script which would go thru the DB and extract a flat file of each pertinent table’s data(1 file/table).I have used DTS to export data from databases.I have never written a script for extraction.Could you please guide me on this and help me in getting started on how to write a script with a small example.Could you also please help me on how to run the script against the database so that it could generate a data file
Do u usually reply to their email or post solutions here?
Thanks
Shveta
Hi Pinal,
Greatest work..Thanks a ton..You have made concepts clear to me..
Pramila
hi Pinal,
thanks a lot,……i think no book will give as much wealthy knowledge as your website gives…..this is the real place to learn a lot and that too your examples are amazing…..easy to understand and learn……..thanks a lot.
Dear
pinal
I am looking forward to change . so for that i need sql server 2005 question and answer
regards
karan
My SQL statements are:
CREATE TABLE doc_exe ( column_a INT CONSTRAINT column_a_un UNIQUE)
GO
ALTER TABLE doc_exe
alter column column_a int identity(1,1)
I get the error:
Msg 156, Level 15, State 1, Line 2
Incorrect syntax near the keyword ‘identity’.
Please explain or correct the sytax.
Thanx
Greatest work..Thanks
Hi Pinal,
I have table structure with data like below. all columns are key columns.
Col1 col2 col4
a1 c 1
b1 a 1
c1 b 1
d2 b 2
b2 c 2
c2 a 2
a2 d 2
b3 a 3
a3 d 3
But I want a query to get first record group by col4. the resultset should be
Col1 col2 col4
a1 c 1
d2 b 2
b3 a 3
Please guide me to get a query.
Thanks,
hom many time takes to download sql server 2008 ?
Hi Pinal,
So nice of you. You are doing a very big help and guidance to people like me.
God bless You and your family.
Hello Sir,
The information there on this blog is very useful & helpful thanks for providing such informative infromation.
Sir i have a query in ms-sql server2000
can we convert numeric(18,0) to identity(1,1) which will be primary key ,
since this ID numeric(18,0) is a foreign key in another table so i wanted that this key should be as primary auto incrementing key
whereas i am also unable to do insert into statement for the same
error ocuuring is as : Cannot insert explicit value for identity column in table
Can you please help me out.
hi
i want to store a image in sql server 2005 by usging Sql command
plz guide me
Hi Dave,
I’m very new to SQL server. Could you please guide with any training materials. Thank you
[...] Those who are scheduled for interview with me next week this is one question I will be sure asking you besides questions from my interview questions and answer series. [...]
Dear Pinal Dave
Really your are doing marvels Job I would like to appreciate your effort and Pray from God you always maintain this effort for deprived person like me.
Regard
Muhammad Junaid Babar
[...] not get this simple question, they smiled and answered that I did not have that on my blog or on my interview questions list. Let us go over the interview [...]
Gr8 job dude..!
Girish Advani
Gujarat
Wonderful Work!
[...] for job in SQL Server related area please find your right job here. Make sure to read all the interview questions and answers for SQL Server 2008 before you appear for [...]
[...] SQL SERVER – 2008 – Interview Questions and Answers Complete List Download Most popular and most visited page. Very first and compilation of SQL Server Interview Question and Answers. [...]
its helping me more to walk in interview
thanks for such a ……
like qus
Hi Pinal,
In your pdf, you have mentioned that “Update Statistics will updates indexes on tables” which is incorrect. Update statisitics will only update stats. For updating indexes you need to rebuild indexes.
Also you have mentioned that select rows from sysindexes is a accurate way of getting rowcount which is also incorrect. If statistics is outdated then this would not give you accurate result.
AD
[...] April 15, 2007 by pinaldave 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. [...]
[...] April 15, 2007 by pinaldave 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. [...]
[...] April 16, 2007 by pinaldave 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. [...]
[...] April 17, 2007 by pinaldave 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. [...]
Hi Dave,
I’m very new to SQL server. I dont know anything about SQL.I am in SQL administrator destination.Could you please guide with any training materials. Thank you
Regards,
Krishna
[...] SQL SERVER – 2008 – Interview Questions and Answers Complete List Download [...]
[...] SQL SERVER – 2008 – Interview Questions and Answers Complete List Download [...]
[...] SQL SERVER – 2008 – Interview Questions and Answers Complete List Download [...]
HI Dave,
I want to make a good career in DBA so will you please tell me what will I do to get good career in MS SQL
Could you please guide me what I do for getting more knowledge in SQL
Please give me advice.
hello sir,
your articles are very nice and all
the students of sql server are enjoyed a lot
Thanks!!!
Hello Mr Dave
Im Sudha..i found ur site today when i was searching for sql server material….My doubt is i want to take sql server 2008 certification..could you plz tell me which is best i mean sql server 2005 r 2008 i didnt take any exam so which is best i mean
MCTS: Microsoft SQL Server 2005
• MCTS: Microsoft SQL Server 2005 Business Intelligence
• MCTS: Microsoft SQL Server 2008, Business Intelligence Development and Maintenance
• MCTS: Microsoft SQL Server 2008, Database Development
• MCTS: Microsoft SQL Server 2008, Implementation and Maintenance
could u plz tell which one is best.
Thanks
Sudha
I am getting this kind of error. during the installation i didnt give any login name and password . so what to enter here as login name i dont know.i tried some of them ur solution still give me same error. My Os is window vista and if i try to see service from computer management does not give me service of sql server.
please help me out.
TITLE: Connect to Server
——————————
Cannot connect to 76.194.236.194.
——————————
ADDITIONAL INFORMATION:
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 – Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 3)
Hi,
I was going thru your interview question collection. In your question “What is difference between DELETE & TRUNCATE commands?” you have mentioned that “TRUNCATE cannot be rolled back”. But I believe this in NOT true and we can rollback a truncate statement.
For example:
Create table #test (I int)
Insert into #test values (1)
Begin tran
Truncate table #test
Rollback
Select * from #test
Drop table #test
The above code snippet returns a value 1. Could you please tell me how this is possible?
Regards,
Rakesh
Thank you for the Q&A pdf. This is really precise and very helpful.
i want to build my career in database.
could u tell me for which certification should i go?
i mean ORACLE or SQL2008.
someone told me that sqlserver2008 will be the best. i m getting confused. pls suggest me.
I m pursuing MCA final year from regular.
thanks
paramjeet singh
I want to learn SQL 2008 and installed, but no front end, like query analyzer, or query developer installed, am I missing something, I tried installing the SQL Management Studio_x86_ENU studio but none looks like installed on my system, my operating system is Windows Vista Ultimate.
Please, guide me, your help is appreciated. – Thank you.
Best regards
udmalla
I have install sql server 2005 in vista ultmate without any problem but not any database is install tell me how can I intall the database and I am not able to write any sql query.
@Dinesh,
If you want sample databases, on which you can learn some Good SQL. Then try installing sample databases.
Here is a step by step pictorial explanation on how to install sample databases.
http://blog.sqlauthority.com/2008/08/10/sql-server-2008-download-and-install-samples-database-adventureworks-2005-detail-tutorial/
~ IM.
Dear @param,
It has been observed that microsoft copies the idea from other softwares or products and make their own one.
However, I’d recommend that If you are really interested in database then you should go for Oracle.
There’s so many reasons but I’ll not going in depth.
Thanks!
[...] September 16, 2008 by pinaldave SQL SERVER – 2008 – Interview Questions and Answers Complete List Download [...]
Really awesome help.
Hey!
Brilliant blog!
Thanks for the pdf!
Regards,
Shravan.
Thanks so much for the Questions and Answers
Thanks again!!!!
Anks
Pinal sir.. great work …
Hi Pinal,
I want to get certification for SQL Server 2005/2008. Can you please provide me the reading material for the same.
Thanks,
Hi Dave
An excellent work and very useful material.
thanks for providing
& Congrats on having baby
Hi Pinal ,
I have written the query in MDX Query Editor in SOL Server 2008 Successfully,
But the problem is when we implement the same query in Cube(as expression in calculated measure) its not working in SSAS 2008
The Error is:- Select statement is not correct in MDX Expression
nice job! your Q&A is most appreciated
Thanks
Hi Pinal,
I have a query for you, Can we write a select query to select only nth row from a table without using where clause?
This question was asked to me in one of my interview.
Regards,
Ashwin Shende
@Ashwin
Without a WHERE clause? That’s an interesting question. That answer is yes, though it is inefficient. If the only the second record is wanted:
DECLARE @A TABLE (A INT);
INSERT INTO @A SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT 3;
SELECT TOP(1)
A
FROM
(
SELECT TOP(2)
A
FROM
@A
ORDER BY
A
) A
ORDER BY
A DESC;