Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Written Interview Questions

Status
Not open for further replies.

Aluminum

Programmer
Jun 8, 2007
41
US
I have googled and read all of the interview questions and answers posts. I have to take a written SQL test, that's all I have been told. It is for a job doing SQL/Server programming and some administration. I think they may be asking me to write stored procedures, functions and other types of things. Anyone know of a good exam that may be used in an interview? Let me know the link. Thanks in advance.
 
There is a lot of information about writing stored procs and functions on the web. It shouldn't be too hard to find. Have you experience do it? If not, it could be difficult under the pressure of a job interview.
 
I have experience writing them in the editor window. A little nervous about doing them long hand. I have just been practicing by testing myself. I find an example online, and then write it out. Or I write out a procedure then type it into SQL and make sure it works. Thanks for the feedback.
 
Longhand! Wow, I hadn't thought of that! I haven't written any code longhand in years. I don't know that I could to it. I suppose I could but would be much more comfortable in SSMS. Good luck.
 
Don't know if this will help, but I ran into a list of Job Interview questions on the SQLServerCentral.com website for new and experienced DBAs. You might want to try that site.
 
The test was in handwriting as I suspected. I don't remember all of the question and don't think I should dump someone else's test on the internet.

Here are some good ones that may help others preparing for the same problem. It's not verbatim so I don't think it will do any harm.

I was asked some open ended sql/server questions:

1) Give an example of an relation database... was not sure what to say so I just drew an ER diagram and described it.

2) describe problems with importing excel files... you can google this one, I hate excel imports.

3) what types of INSERT statements are there... I thought that could either be INSERT or BULK INSERT but maybe it's also INSERT from VALUES or INSERT from SELECT. I just put them al down to be safe.

4) What is the difference between char and nchar... I think this is nchar has codepage data

5) SQL data types...google

6) How to tune a query

and some other questions about sql server and then some about my background.

Then I was given two table formats and I had to write an CREATE TABLE for them. Then I had to insert data using INSERT based on the values they gave. The tables were parent/child so I had to create they keys when I created the tables.

Then I had to update an age column based on birthdate, build other fields by concatinating data, an update that needed both tables joined and a delete also needing both tables joined.

I recommend testing yourself doing CREATE TABLE (with index/primarykey) INSERT, UPDATE, DELETE as well as some selects using handwriting. I felt more comfortable after I practiced these during the test. I can do it in the editor, but did leave out things when I wrote them down and then tried it in the editor. After a few hours of practice, I had it down.

I also went a little further and wrote some stored procedures and functions but never needed it. I googled "SQL Server Interview questions" and found some good stuff. I the SQLServerCentral.com questions as well as the blog below. If you have never read his blog, I think it's excellent.

 
Wow. Creating a table in code from memory without SSMS! I don't know that I could do that. I'm sure I'd miss parts of statements. I hope you did well. Good luck.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top