< Previous | Next >

Create a DB2 SQL query

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.
You will work with a DB2 database for a video store called VIDEOS. The database holds data that is related to the store customers, inventory, video rentals, and employees. The video store application needs a query that lets the store employees look up the video titles that a particular customer has rented and what day of the week the videos are due. The query involves two joins, a query condition (WHERE clause), and a GROUP BY clause. The DB2 SQL statement also needs a CASE expression, a function, and a host variable to substitute the name of the customer at run time.

Learning objectives

When you complete the exercises, you will know how to do the following tasks:
This tutorial should take approximately 30 minutes to finish. If you explore other concepts related to this tutorial, it could take longer to complete.

Skill level

Beginner

Audience

Database application developers
< Previous | Next >

Feedback