SQL Training – Introduction

This 1 day (Structured Query Language) SQL training course will rapidly give you a thorough grounding in the basics of SQL. It will show you the key features and capabilities of SQL and get you using it as quickly as possible.  The course covers elements of ANSI SQL using SQL Server as an example database.

By the end of this course you will be able to use SQL confidently. You will not be an expert user but comfortable using SQL to carry out many day-to-day queries and tasks.

You will be able to select, sort, insert, delete and update in a database using SQL. You will be able to group data and also work with some relatively straightforward functions like Dates and using SQL to work out the difference between dates.

It is recommended that students have good experience of windows and some experience of using relational databases.

Our courses run from 9.30 am to approximately 4.30 pm. While you are with us we are focused on offering you a relaxed and productive learning environment. When you book a course with use you get the following:
  • A full colour SQL course manual.
  • The exercises that you have worked on during your course to allow you to practice afterwards.
  • USB stick to take the exercises away (where relevant).
  • Freshly prepared lunch in our onsite cafeteria.
  • Refreshments though out the day.
  • Training in fully air conditioned facilities from an experienced SQL instructor.

We start this session with an overview of relational databases and how SQL works within that context. We also have a look at the database that we will be running out SQL queries on during this course and get comfortable with the interface.

The key topics trained are:

  • Relational Database Concepts
  • The role of SQL

Having laid the groundwork in the previous section of the this course, we get our hands dirty with our first queries. This session covers selecting data from a database using SQL. We look at selecting whole tables and also columns from our selected database table. We introduce the SELECT statement and practice a few queries.

The key topics trained are:

  • Selecting data
  • SELECT statement syntax

Having carried out our first queries in the previous session we now look at how we can limit the data that is returned. This introduces the WHERE section of SQL queries. We also take a look at how we can sort the output of our queries.

The key topics trained are:

  • Limiting the rows returned by a query
  • The WHERE Clause
  • Sorting the rows

This session covers the more advanced SQL statements for queries. It looks at how to work with text strings, numbers and date functions in queries. We look at how to use aliases when columns have very long names or names that aren’t readable. We also look at using CONVERT to change the units and presentation of data in a database. An example being to change how a date is presented in the output of a query. We finish by learning how to use calculations in queries. This allows you to apply a mathematical function to your results before they are presented. For example, to multiply a day rate (stored in the database) by five working days in a week to get a weekly amount. The weekly amount being the figure that is needed in the output of the query.

The key topics include:

  • The types of functions available in SQL
  • Using Character, Number and Date functions in SELECT statements
  • Conversion functions and their uses
  • Column aliases
  • Performing calculations

This session looks more heavily at the syntax that is used with SQL queries. We look at using SQL statements to amend our database. We cover using INSERT to create new entries, UPDATE to amend existing entries and DELETE to delete existing entries. We finish with an introduction to SQL transactions and the commit and rollback commands they include. No database changes can be made outside a SQL transaction. In very simple terms, a transaction is any SQL statement that isn’t a SELECT query.

The key topics trained include:

  • Working with INSERT
  • Working with UPDATE
  • Working with DELETE
  • Using begin transactions with commit and rollback

Having spent some time looking at using SQL to query and edit databases we now return to more advanced quering using SQL. SQL offers a number of ways to consolidate and aggregate the output of our query. We look at using the aggregate function to introduce sub-totals. We also look at using the COUNT function to show us the number of items in our results. We finish looking at using the HAVING statement. The HAVING clause is the equivalent of a WHERE clause but when working with aggregate functions.

The key topics trained include:

  • Aggregate functions
  • COUNT Vs Count(*)
  • HAVING Clause
  • GROUP BY

The final section of this SQL introduction course look at working with dates. Dates can be tricky in SQL as they are not standard numeric pieces of information. However, once you know how SQL works with dates they are relatively straight forward to work with.

The key topics trained include:

  • Date functions
  • GetDate( )
  • DateADD( )
  • DateDIFF( )