Skip to main content


Suppress/return error upon CREATE of a primary key constraint when one exists.


[SQL]    DDLNo307=n


The value n may be 1 or 0:

  • If 1 (true) when an attempt is made to CREATE a primary key constraint to a table through DDL, and a primary key constraint already exists for that table, Caché suppresses the SQLCODE -307 error.

  • If 0 (false) Caché returns the error.



Range of Values

0 or 1. The default is 0.

Management Portal

On the page System Administration > Configuration > SQL and Object Settings > General SQL Settings, for the Allow Create Primary Key Through DDL When Key Exists setting, choose Yes (true) or No (false).

FeedbackOpens in a new tab