Views Wizard (DB2 LUW)

From DBArtisan
Jump to: navigation, search

Go Up to IBM DB2 for Linux, Unix, and Windows Object Wizards

A view gives you an alternative way to look at data in one or more tables. You can customize how you see a table’s contents.

To create a new view using a wizard:

  1. Open a creation wizard for a view. For details, see Opening an Object Wizard.
  2. Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:
  3. Finally, use the Execute button to create the object.

Views (DB2 LUW) - Properties

When creating or editing a view, this tab/panel lets you work with the following settings:

Setting Description

Schema

Select the owner of the view. The owner of the view must have SELECT privileges for the tables in the CREATE view statement or DBADM authority on the database that contains the table.

Name

Provide a name for the view.

Check Type

CHECK_NONE - No search conditions must be satisfied for insert or update operations. CHECK_LOCAL - Update and insert operations on view must satisfy the search conditions of the view and underlying views that are defined with a check option. Furthermore, every updatable view that is directly or indirectly defined on view inherits those search conditions (the search conditions of view and all underlying views of that are defined with a check option) as a constraint on insert or update operations.

CHECK_CASCADED - Update and insert operations on the view must satisfy the search conditions of view and all underlying views, regardless of whether the underlying views were defined with a check option. Furthermore, every updatable view that is directly or indirectly defined on view inherits those search conditions (the search conditions of view and all underlying views) as a constraint on insert or update operations.

Views (DB2 LUW) - Definition

Complete the CREATE VIEW statement by typing or pasting in the relevant query.