I need lots of training in SQL coding in MS SQL server

The following part that is needed to be improved is:

  • script
  • T SQL
  • Procedure
  • Function

Where can I get material to improve my ability in SQL coding? Is there any website for downloading a database with different task/assignment and solution?

Where should I go to review lots of SQL code?

  • Use SQL in a non-trivial application with a SQL-powered database as a backend? Apr 11, 2011 at 1:22

6 Answers 6


You can download and install the Northwind and Pubs sample database.

This is used in many tutorials and examples on MSDN.

Then, start reading through Books Online about the topics you have difficulties with. Play around with the databases.


This might not be directly realated to your question but if your looking for different SQL problems and techniques to solve them i would suggest having a look at some books by Joe Celko.

  • thinking in Sets: Auxiliary, Temporal and Virtual Tables in SQL
  • Trees and Hierarchies in SQL for Smarties SQL
  • Puzzles and Answers

He does have some other titles but these should cover most areas in the usage of SQL.


Just try to prepare for MS exam 70-433. Use suggested books.

  • Which book do you suggest in order to read MS exam 70-433? Apr 11, 2011 at 16:28
  • I passed sql exam 10 years ago, so don't really know current "state of art". However books recommended as training material 10 years ago were useful. So I guess for instance this one: microsoft.com/learning/en/us/… should be good.
    – m5ba
    Apr 11, 2011 at 18:11

The textbook I've been using, Microsoft T-SQL Fundamentals, comes with a sample database and sample questions (with solutions). I highly recommend the book.

Browsing StackOverflow for SQL questions has been useful for me. This custom link I use has most of the SQL tags (specifically SQL Server) for easy browsing.

Lastly, try the links mentioned in this question. https://softwareengineering.stackexchange.com/questions/49942/website-with-sql-exercises-and-solutions


If you want to learn about using functions and a lot of other t-sql knowledge, I can't recommend Transact SQL User Defined Functions by Andrew Novick enough. Everything from design to formating. Before starting this book, you should have a basic understanding of sql. Probably one of the better programming books I've ever read.


You can get some help from tutorials such as ones available at Fianga and Function X.

From Fianga:

Microsoft SQL Server is a computer application used to create desktop, enterprise, and web-based database applications. It is used at different levels and with various goals. This web site provides lessons and topics on how to use Microsoft SQL Server 2008 to create and manage databases.

Not the answer you're looking for? Browse other questions tagged or ask your own question.