SQL Server Database Querying Course

Duration: 3 Days

Objectives

This course is aimed at those who need to extract information from a relational database system. Although it provides an overview of relational database design principals it does not cover the teaching of formal database design processes and database/table creation. The course assumes no previous knowledge of SQL and SELECT statements, and takes delegates from simple queries, through to complex queries involving multiple tables, introducing the vast collection of built-in functions along the way. Covers SQL Server 2005, SQL Server 2008, SQL Server 2012 and SQL Server 2014

Pre-requisites

Delegates would benefit from a basic understanding of what a relational database is a familiarity with the terms tables, columns, and relationships, these concepts will be overviewed at the start of the course.

Course includes

A comprehensive set of reference notes covering course topics and follow-up telephone support.

Course outline

Relational Database Overview

  • Basic Relational Database Terminology
  • Relational Database
  • Tables and Columns
  • Rows and Records
  • Connecting Tables
  • Primary Keys
  • Foreign Keys
  • Relationship Types

The SELECT statement

  • SELECT list
  • Columns
  • ALL or DISTINCT
  • String Expressions
  • Arithmetic Expressions
  • Column Aliases

Comparison Conditions

  • Relational Operators
  • BETWEEN AND
  • IS NULL Example
  • IN Example
  • LIKE Examples
  • Working With Dates
  • NOT

Multiple Conditions

  • Mixing AND with OR

The Top Option

  • WITH TIES
  • TOP n PERCENT

UNION

  • UNION ALL
  • INTERSECT
  • EXCEPT

Functions

  • Functions in SELECT Lists
  • Functions in WHERE Clauses
  • Functions in ORDER BY Clauses

Aggregate Functions

  • COUNT
  • SUM
  • MAX
  • MIN
  • AVG
  • NULL Values and Aggregates
  • Aggregate Expressions

Mathematical Functions

  • SQUARE
  • POWER
  • SQRT
  • RADIANS, SIN, COS, TAN
  • ABS
  • ROUND
  • CEILING & FLOOR

Conversion Functions

  • CAST and CONVERT
  • Converting Dates To Strings
  • Converting Money Values To Strings
  • ISNULL Function

String Functions

  • UPPER & LOWER
  • STR
  • LEFT & RIGHT
  • CHARINDEX
  • SUBSTRING
  • REVERSE, REPLACE and SPACE
  • RTRIM & LTRIM
  • REPLICATE
  • Using REPLICATE To Pad Strings
  • ASCII & CHAR

Date Functions

  • GETDATE
  • YEAR, MONTH & DAY
  • DATEPART & DATENAME
  • Date Arithmetic
  • DATEADD & DATEDIFF

Substitution Functions

  • COALESCE
  • NULLIF

Cross Joins

Inner Joins

  • Legacy Style Joins
  • ANSI Style Joins
  • Simple Joins
  • Two Tables
  • Three Tables
  • Four Tables
  • INNER JOIN Theory

Outer Joins

  • LEFT JOIN
  • RIGHT JOIN
  • FULL OUTER Join

Table Aliases

Self Join

Advanced Joins

  • Multiple INNER JOINS
  • Multiple OUTER Joins

Working with Aggregate Data

  • The GROUP BY Clause
  • Identifying The Group
  • Including Columns In The SELECT List
  • The HAVING Clause
  • When is a HAVING a WHERE?

Sub Queries

  • Simple Sub Queries
  • Using Aggregate Functions in Sub queries
  • Sub Queries Returning Multiple Records
  • Correlated Sub-Queries
  • Derived Table Sub-Queries

Course Dates

London CentralLondon GreenwichBristol

London Greenwich

Dates Price Book Now
11 - 13 Jul £1195 Book Now
8 - 10 Aug £1195 Book Now
5 - 7 Sep £1195 Book Now
21 - 23 Nov £1195 Book Now
18 - 20 Dec £1195 Book Now
See more dates...
All our courses run in London and Bristol, or can be tailored to requirements at your own offices. For alternative dates, please email or call us on 0208 269 4260
All prices are per person and are subject to VAT
15% discount for groups of four delegates.
10% discount for groups of three delegates.
(This offer applies for delegates on the same public scheduled course on the same date.)

Related Courses


"Exceptional knowledge base and tailored to suit our requirements."

RAF

"One of the most enjoyable and informative courses I have ever attended."

Invacore Ltd

"I thought the course and the location were perfect."

MOD



 

 

© Transmedia . 277 Greenwich High Road London SE10 8NB  UK . 0208 269 4260
Designed by Transmedia's Web Team