This tutorial teaches you how to create
and run a DB2® SQL query. Using
the SQL Query Builder, which is a visual interface for
creating and running SQL queries, you will build a SELECT statement.
The statement will include a table alias, a column alias, a database
function expression, a CASE expression, and a grouping clause.
Learning objectives
When
you complete the exercises, you will know how to do the following
tasks:
- Create a SELECT statement
- Add tables to the statement
- Add table aliases
- Specify result columns
- Add a CASE expression to the result column set
- Add a column alias
- Join tables
- Create a query condition
- Add a GROUP BY clause
- Run the DB2 SQL query and
pass in a host variable for the query
30 minutes