Show TOC

 Inserts with Database ViewsLocate this document in the navigation structure

Use

If a database view contains only one single table, you can insert data in this table with the view (see maintenance status ). You have the following options for the contents of the table fields that are not contained in the view:

  • If the field is defined in the database with NOT NULL as the initial value, the field is filled with the corresponding initial value.
  • If the field is defined in the database as NOT NULL without an initial value, an insert is not possible. This results in a database error.
  • If the field is not defined in the database as NOT NULL, there is a NULL value in this field.

You must insert data in the table with a database view only if initial values are defined for all the table fields not contained in the view.

Changing data records that already exist with a database view is not critical if the database view contains all the key fields of the table.

When you insert data records with maintenance views or projection views , all the table fields not contained in the view are assigned the default value of the field. This does not depend on whether the field is defined in the database as NOT NULL. This avoids NULL values in these fields.