GeeCON Prague 2014*
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
Author

Dropping Unique Key

ford Darcy Jr
Ranch Hand

Joined: Jan 26, 2005
Posts: 76
Hi,

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.

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

Joined: Mar 06, 2006
Posts: 6
Hi,
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.

Thanks,
Mahesh
 
jQuery in Action, 2nd edition
 
subject: Dropping Unique Key