|
|
|
|
|
|
|
|
|
|
|
Re: UNIQUE CONSTRAINT FOR EXISTING COLUMN WITH DUPLICATE RECORDS [message #665564 is a reply to message #665524] |
Mon, 11 September 2017 05:14 |
John Watson
Messages: 8951 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
Poovaraghavan wrote on Fri, 08 September 2017 12:37Thanks Bro,
I found that if we use "deferrable novalidate" in unique constraint syntax. It is creating a unique index for that column. But we cannot able to create the unique index directly for the above scenario...
" ALTER TABLE TABLE_NAME ADD CONSTRAINT CONSTRAINT_NAME UNIQUE(COLUMN_NAME1....) DEFERRABLE NOVALIDATE "
No, this syntax does not create a unique index. It creates a nonunique index. You'll see this if you check dba_indexes.uniqueness
|
|
|
|