If the name of the index is different from the name of the constraint, your script is working well. But if the names are the same, there is no create index command in your script, and index is implicitly created by "alter table add constraint" command. This is not the same, implicitly created...
Hey,
I see I have to provide some example. Here it is:
CREATE TABLE pod_lekar (
cislo_podani VARCHAR2 (20 CHAR) NOT NULL ,
lekar_id NUMBER (15) NOT NULL ,
jmeno VARCHAR2 (200 CHAR) NOT NULL ,
adresa NUMBER (9) NOT NULL ,
telefon...
Hello,
this bug (release notes: DDL for Table primary/unique keys was not correct when based on other indexes) is still not fixed.
Correct DDL generated by Oracle SQL Developer:
ALTER TABLE "J_PNP_TAB"."POD_LEKAR" ADD CONSTRAINT "PK_POD_LEKAR" PRIMARY KEY ("CISLO_PODANI", "LEKAR_ID")
USING...
There is a difference between DDL I wrote on one DB, and difference script PL/SQL Developer generated using Compare User Objects.
Real command:
--------------------
create unique index PK_POD_IDX on POD_POD (CISLO);
alter table POD_POD add constraint PK_POD primary key (CISLO) using index...