TSO-ISPF JCL COBOL VSAM DB2 CICS Tools Articles Job Portal Forum Quiz Interview Q&A

DB2 - SQL Alter View Statement


The ALTER VIEW statement regenerate an existing view by altering a reference type column to add a scope. The ALTER VIEW statement also enables or disables a view for use in query optimization.

Following is the view alteration syntax.

ALTER VIEW view-name
    ALTER column column-name ADD SCOPE table-name
          [ENABLE/DISABLE QUERY OPTIMIZATION] 

You use the ALTER VIEW command to regenerate an invalid view after altering one of the base tables to ensure that the view continues to be valid.



If you have any doubts or queries related to this chapter, get them clarified from our Mainframe experts on ibmmainframer Community!

Are you looking for Job Change? Job Portal