Remove unique, primary key, or check constraints

The Remove Physical File Constraint (RMVPFCST) command allows you to remove a physical file constraint. The full effects of the command depend on the type of constraint you remove and how it is used.

To remove a physical file constraint, use the RMVPFCST command.
You can specify any of the following values on the Constraint (CST) parameter for each of the constraint types:

You can also remove a constraint using Structured Query Language (SQL) or iSeries™ Navigator.

Considerations for removing constraints

If you remove a primary key or a unique constraint, and the associated access path is shared by a logical file, the ownership of the shared path transfers to the logical file. If the access path is not shared, it is removed.

When you remove a primary key constraint with the RMVPFCST command, the system sends an inquiry message to determine if the key specifications should be removed from the file. A reply of 'K' maintains the key specifications in the file. The file remains keyed. A reply of 'G' indicates that the file will have an arrival sequence access path when the command completes.

Note: When you remove a primary key constraint with the SQL ALTER TABLE statement, the inquiry message is not sent. The key specifications are always removed and the file has an arrival sequence access path when the ALTER TABLE completes.
Related concepts
DB2 UDB for iSeries SQL Reference
Get started with iSeries Navigator
SQL programming
Related reference
Remove Physical File Constraint (RMVPFCST) command