Hitachi

Hitachi Advanced Database Setup and Operation Guide


11.2.6 Checking whether a viewed table is updatable

To check whether a viewed table can be updated using the INSERT, UPDATE, or DELETE statement, use the SELECT statement to search the SQL_VIEWS dictionary table.

The following shows an example of checking whether a viewed table is updatable.

Example:

This example checks whether the viewed table CUSTOMER30s, defined by ADBUSER01, is updatable.

SELECT "IS_UPDATABLE" FROM "MASTER"."SQL_VIEWS"
  WHERE "TABLE_SCHEMA"='ADBUSER01' AND "TABLE_NAME"='CUSTOMER30s'

If the search result is Y, the viewed table is updatable. If the search result is N, the viewed table is read-only and cannot be updated.

For details about dictionary table SQL_VIEWS, see B.9 Content of SQL_VIEWS.