Create a materialized query table

To create a materialized query table:

  1. In the System i Navigator window, expand the system you want to use.
  2. Expand Databases.
  3. Expand the database and schema that you want to work with.
  4. Right-click the Tables container and select New, then Materialized query table.

On the Table tab:

  1. In the Table name field, specify a table name.
  2. In the Table schema field, specify a schema where the table will reside.
  3. Specify a description (optional) in the Text field.

On the Materialized Query tab:

  1. Enter the SQL SELECT statement that defines the query upon which the materialized query table is created. You can optionally click SQL Assist to build the statement interactively.
  2. Optionally, check that the syntax of the SELECT statement is valid.
  3. Optionally, see a preview of the result set generated by the SELECT statement.
  4. Optionally, populate the table immediately when the table is created.
  5. Click OK.