Altering views

You cannot use an SQL ALTER statement to change a view. Therefore, to make changes to a view, Db2 Admin Tool generates a set of jobs that drop the view and then re-create it.

Procedure

To alter views:

  1. On the DB2 Administration Menu (ADB2) panel, select option 1, and press Enter.
  2. On the System Catalog (ADB21) panel, specify any selection criteria at the bottom, specify option V, and press Enter.
  3. On the Views (ADB21VV) panel, specify one of the following line commands next to the view that you want to change:
    Start of changeRENEnd of change
    Start of changeSpecify this line command to rename the view. Specify the new name on the Rename VIEW (ADB21VR) panel. Press Enter, and skip to step 5.End of change
    ALT
    Specify this line command for all other changes. Panel ADB27CAA might appear briefly while the definition of the view is being retrieved. An SQL CREATE VIEW statement for the view is displayed in an ISPF Edit Session.
  4. Edit the CREATE VIEW statement to make the changes that you want, and press PF3.
    The Alter Objects (ADB27CA) panel lists the view. The Operation column shows the action MODIFY. If you did not change the CREATE VIEW statement, no operation is listed.
  5. Generate an ALT job