Introduction to SQL Training

This SQL training course is designed for students new to writing SQL queries. A typical student will need to learn SQL to build applications or to generate business reports. For the most part, the SQL learned in the course is applicable to all major databases. In the few cases in which there are differences between the databases, these differences will be pointed out.

Goals

Understand how relational databases work.

Learn to use SQL to output reports.

Learn to write SQL queries to retrieve data from multiple tables.

Outline

Relational Database Basics

Brief History of SQL

Relational Databases

Tables

Rows

Columns

Relationships

Datatypes

Primary Keys

Foreign Keys

Relational Database Management System

Popular Databases

Commercial Databases

Popular Open Source Databases

Valid Object References

SQL Statements

Database Manipulation Language (DML)

Database Definition Language (DDL)

Database Control Language (DCL)

Simple SELECTs

Introduction to the Northwind Database

Some Basics

Comments

Whitespace and Semi-colons

Case Sensitivity

SELECTing All Columns in All Rows

Exploring the Tables

SELECTing Specific Columns

Sorting Records

Sorting By a Single Column

Sorting By Multiple Columns

Sorting By Column Position

Ascending and Descending Sorts

The WHERE Clause and Operator Symbols

Checking for Equality

Checking for Inequality

Checking for Greater or Less Than

Checking for NULL

WHERE and ORDER BY

The WHERE Clause and Operator Words

The BETWEEN Operator

The IN Operator

The LIKE Operator

The NOT Operator

More SELECTs with WHERE

Checking Multiple Conditions

AND

OR

Order of Evaluation

Writing SELECTs with Multiple Conditions

Advanced SELECTs

Calculated Fields

Concatenation

Mathematical Calculations

Aliases

Calculating Fields

Aggregate Functions and Grouping

Aggregate Functions

Grouping Data

Selecting Distinct Records

Working with Aggregate Functions

Built-in Data Manipulation Functions

Common Math Functions

Common String Functions

Common Date Functions

Data Manipulation Functions

Subqueries, Joins and Unions

Subqueries

Joins

Table Aliases

Multi-table Joins

Using Joins

Outer Joins

Unions

UNION ALL

UNION Rules

Working with Unions

Class Materials

Each student in our Live Online and our Onsite classes receives a comprehensive set of materials, including course notes and all the class examples.