SQL Introduction
Course Outline

DURATION 2 Days
PREREQUISITES This is an introduction level class, so there are no prerequisites.
DESCRIPTION This course will introduce you to relational databases (RDBMSs), and SQL (Structured Query Language) - the language used to create, modify, manage and query them. Using real world examples you will create tables, set permissions, insert, update and delete data, and retrieve your data using standard SQL. You will also learn about the most common features of the proprietary extensions to the standard language supported by the two most common databases - Microsoft SQL Server and Oracle.
COURSE DATES Click here to request an alternate date
Or call us on 020 313 73958 from 8:00 to 22:00 Monday to Sunday.

Weekday Mon, 27-Sep-10 and Wed, 1-Sep-10 09:30 - 16:30 £495
Weekday Mon, 25-Oct-10 and Tue, 7-Dec-10 09:30 - 16:30 £495
Weekday Mon, 20-Dec-10 and Tue, 7-Dec-10 09:30 - 16:30 £495

 

 

 

INTRODUCTION

  • Databases and SQL
  • Types of databases
  • Common applications of databases
  • Popular Databases
  • What is SQL?
  • Subsets of SQL

Tables

  • What is a table?
  • Creating a table
  • Column definitions
  • Common SQL data types
  • Putting it all together
  • Note on syntax
  • Table and column name rules
  • Table and column name rules
  • More DDL

Adding records to a table

  • The INSERT Statement
  • Inserting into DATE columns
  • Inserting the current date

Primary keys and foreign keys

  • Primary keys
  • Choosing a primary key
  • Declaring a primary key
  • Surrogate primary keys
  • Support for surrogate primary keys – SQL Server
  • More on SQL Server Identity columns
  • Support for surrogate primary keys - Oracle
  • More on Oracle sequences
  • Foreign Keys
  • Declaring a foreign key
  • Handling deletions

Other types of constraint

  • Adding constraints to a column
  • Making table columns mandatory
  • The NOT NULL constraint
  • CHECK constraints
  • Declaring a check constraint at column level
  • Declaring a check constraint at table level
  • Creating constraints independently
  • Removing constraints

Selecting data from a table

  • The SELECT statement
  • The WHERE clause
  • Conditional selections
  • More conditional selections
  • The LIKE condition
  • The IN condition
  • The BETWEEN condition
  • Case sensitivity
  • Combining conditions with AND and OR
  • Precedence of AND and OR
  • Negating a predicate with NOT
  • SELECT..INTO
  • Creating a table from a query result
  • Sorting results with ORDER BY
  • More on the ORDER BY clause
  • Shortcuts with the ORDER BY clause

Selecting from multiple tables

  • Table Joins
  • Inner Joins
  • Outer Joins
  • Non standard table join syntax
  • Non-equijoins
  • Table aliases
  • Column aliases
  • Linking multiple tables
  • Self joins

Doing more in the SELECT statement

  • The DISTINCT keyword
  • Mathematical operators
  • Mathematical operators can work on more than one column
  • Mathematical functions
  • Handling NULL values
  • Character functions
  • Tip: Overriding case sensitivity in Oracle
  • Initialise capitals
  • Concatenating character values
  • Character functions can be combined
  • Date functions
  • SQL Server date functions
  • Oracle date functions
  • Date arithmetic
  • Tip: Use TRUNC when comparing dates in Oracle
  • Converting datatypes: Oracle
  • Converting datatypes: SQL Server
  • Tip: Use CONVERT when comparing dates in SQL Server
  • Using functions in the WHERE and ORDER BY clauses

Aggregate Functions

  • The GROUP BY clause
  • The HAVING clause
  • Combining clauses
Subqueries, correlated subqueries, unions and inline views
  • Single row subqueries
  • Multi row subqueries
  • Correlated subqueries
  • UNIONs
  • UNION ALL
  • MINUS and EXCEPT
  • Inline views

Updating and deleting

  • The UPDATE statement
  • The DELETE statement
  • The TRUNCATE statement
  • Views
  • Creating a view
  • Manipulating a view

Data access

  • Controlling access with DCL
  • Users
  • Roles
  • The GRANT command
  • The REVOKE command
  • Accessing another user’s objects
  • Easier access with SYNONYM s

Transaction Control

  • Transactions
  • COMMIT ting changes
  • Rolling back changes

 

 

 




Home | Contact | Terms and Conditions