Previous Topic: -164 - CHARACTER DEFAULT MORE THAN 20 BYTESNext Topic: -166 - TBL authid.tblname CHECK PENDING


-165 - DUPLICATE CONSTRAINT NAME: nnnnnnnn mmmmmmmm

Explanation

You attempted to add a new constraint during CREATE TABLE or ALTER TABLE, but the name chosen already exists. The nnnnnnnn is the schema ID (creator) of the constraint, and the mmmmmmmm is the name of the constraint.

The SQLSTATE that equates to this SQL return code is 42710.

User Response

Select another name. Constraint names are unique within schema ID. You can query the SYSCONSTRSRC table to see which names are already in use.