File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Oracle/OAS and the fly likes Dropping Unique Key Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Oracle/OAS
Bookmark "Dropping Unique Key" Watch "Dropping Unique Key" New topic

Dropping Unique Key

ford Darcy Jr
Ranch Hand

Joined: Jan 26, 2005
Posts: 76

I have a table test. It has a primary key column ID and a unique key column ID2. I want to drop the unique key from column ID2.

Alter table test drop unique (ID2); is not working. How do I achieve this.

[ March 02, 2006: Message edited by: ford Darcy Jr ]
Mahesh Kuhile

Joined: Mar 06, 2006
Posts: 6
U have to use following command,

alter table [table_name] drop constraint [constraint_name]

If u dont have the constraint_name then use following command retrive it.

select * from user_constraints where table_name = 'TABLE_NAME'

Hope this helps.

I agree. Here's the link:
subject: Dropping Unique Key
jQuery in Action, 3rd edition