PL/I · DB2 SQLCODE

SQLCODE -603: Unique Index Cannot Be Created Because Duplicate Rows Exist

What does SQLCODE -603: Unique Index Cannot Be Created Because Duplicate Rows Exist mean in PL/I?

A CREATE UNIQUE INDEX, often part of deploying a new PL/I-driven table, failed because the table already contains rows with duplicate values in the columns that were supposed to become unique.

SQLCODE -603: Unique Index Cannot Be Created Because Duplicate Rows ExistDB2 for z/OS · PL/I (embedded SQL)

Condition

A CREATE UNIQUE INDEX, often part of deploying a new PL/I-driven table, failed because the table already contains rows with duplicate values in the columns that were supposed to become unique.

Fix

Query the table to find and resolve the duplicate rows, or decide the index shouldn't actually be unique, before retrying the CREATE INDEX.

Related db2 sqlcode