Specify the CREATE TABLE definition SQL with the INSERT ONLY operand (falsification prevention option) specified. Alternatively, you can change the definition of an existing table to a falsification prevented table by specifying the INSERT ONLY option in ALTER TABLE.
When you are defining a table or changing a table's definition, you can define the following types of columns:
- Updatable column
If you define an updatable column, you can update data for each column as follows:
- Always updatable (UPDATE specified)
- Updatable from null value to a non-null value only once (UPDATE ONLY FROM NULL specified)
You can define updatable columns at the following times:
- When CREATE TABLE is executed
- Before ALTER TABLE (CHANGE INSERT ONLY) is executed
- When ALTER TABLE (ADD column-name) or ALTER TABLE (CHANGE column-name)* is executed
- * ALTER TABLE (CHANGE column-name) cannot be executed on falsification prevented tables. If you are changing the definition of an existing table to a falsification prevented table, you must have executed this statement in advance.
- Insert history maintenance column
If you define an insert history maintenance column, you can specify a deletion prevented duration. Because the DROP TABLE statement cannot be executed if there is data in such a table (see 13.14.2(1) Definition SQL), the table and its data are both protected from deletion when the deletion prevented duration is omitted. Therefore, you should specify a deletion prevented duration only if the period over which the data needs to be maintained has been clearly determined or can be determined.
Because there are limitations* on the operations that can be performed on RDAREAs by the database reorganization utility or the pdrels command, it is recommended that you store each falsification prevented table in a single RDAREA.
- * You must execute a command shutdown on the RDAREA in order to use the database reorganization utility to reorganize a falsification prevented table. If the database reorganization utility terminates abnormally, then if there are any other tables or indexes defined in the RDAREA they will become unavailable, because you cannot release the shutdown until the reorganization has been completed. For details, see 13.14.2 Restrictions.