posted 17 years ago
In a table creation scrript I hvae
create or replace table EDITOR (
...
CONSTRAINT "EDITOR_UNIQUE" UNIQUE(NAME, COLUMN_NAME) ENABLE
..
)
I meant to make the combination of "NAME" and "COLUMN_NAME" be unique (neither of them is PK). In the DDL script I didn't add anything else. But it seems Oracle does not actually create such constraint for me as I can insert rows with such duplicated values. I don't know why. Somebody said I need to create a "index" for this constraint like
CREATE UNIQUE INDEX "EDITOR_UNIQUE" ON "EDITOR" ("NAME", "COLUMN_NAME")
/
Is it true ??
Thanks.