Introduction to ANSI SQL
|Duration: 2 days|
|Participants: IS personnel and end users.|
Upon successful completion of this course you will be able to:
- Code ANSI standard SQL (Structured Query Language) select, insert, update, and delete statements to access and update tables.
- Understand the fundamental concepts of a relational database and describe the relational data model.
- Distinguish between ANSI standard and product-specific SQL.
- This is an introductory SQL course, designed for those who need to learn ANSI SQL as a prerequisite for a course in a specific relational database product.
- ANSI SQL is not a prerequisite for our DB2/SQL Application Development nor for our QMF Workshop courses, as these courses already contain the introductory material found in this SQL course.
|Format: Lecture and discussion with hands-on exercises.|
- Introduction to Relational Databases
Concepts of the Relational Data Model
Implementing the Relational Data Model
Table, columns and rows
Example of creating a table
Example of selecting data
Overview of objects
Structural vs value-driven tabular format
ANSI Standard SQL
History of SQL
- Structured Query Language
Basics of SQL
Simple SELECT statement
Definition of terms
SELECT parameters: Column list, FROM, WHERE, ORDER BY
Executing interactive queries
BETWEEN, IN, LIKE
Compound search conditions: AND, OR, Parentheses
Eliminating duplicate rows
Effect of NULLS
Date and time considerations
- SQL Data Manipulation
Multi-row insert processing
Restrictions on updating primary key
- Advanced SQL
Greater than join
Joining rows of the same table
Union of two SELECTs
Union with ORDER BY
Union coding rules
Subqueries vs joins