SQL Training for Deloitte and some SQL Tips

SQL Training for Deloitte and some SQL Tips

Last week I was delivering SQL training for Deloitte once more.

Previous cohorts comprised a room of non-IT graduates. But this time, around half the class had an IT related degree and some experience of SQL.  This wasn’t a major problem because the level of SQL that is taught at university, even for computer science degrees, is rather rudimentary.

The first time I delivered this course for Deloitte, they requested one of the Microsoft courses. From the outset I knew that it wouldn’t be a good fit.  Most of the Microsoft courses are designed to teach a particular release of SQL server rather than SQL in general. For example Querying Microsoft SQL Server 2012 is designed for those who are already proficient in SQL, but want to learn the nuances of SQL Server 2012. Therefore I would recommend it to those migrating from SQL Server 2008, or maybe to someone with with a strong background in Oracle, or some other database.  Certainly not for someone new to SQL.

That first course started off following the Microsoft syllabus as requested, but by the middle of the week the training manual was in the trash, and we were actually *learning* to write SQL. By the end of the week, the entire class were able to write stored procedures that joined across 4 tables. I reckon that’s quite an achievement.

I always like to focus on good coding standards for SQL. Having worked on large database projects for some Fortune 100 companies, I’ve picked up a few things that you won’t find in the Microsoft courses. One of my tips revolves around the placement of commas.

Let’s consider a simple SELECT statement from the Northwind database. Most text books will teach you to do the following:

Did you notice the missing comma? It’s not easy to spot is it?  For this reason I prefer to put the comma before each column name as shown below:

It’s a fairly simple tip, but it makes coding large SQL queries a little easier, and less prone to human error.

For more information on technical training by Coding Fury, please visit our Training page.