This week's book giveaway is in the JavaFX forum.
We're giving away four copies of Introducing JavaFX 8 Programming and have Herbert Schildt on-line!
See this thread for details.
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

Win a copy of Introducing JavaFX 8 Programming this week in the JavaFX forum!
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
It's not a secret anymore!