Database Management
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesDatabase Management

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
1200+ fellow developers rate and compare features of the top IDEs, like Visual Studio, Eclipse, RAD, Delphi and others, across 13 categories. Enjoy this FREE Download of the IDE User Satisfaction Study by Evans Data Corporation. Download Now!
  #1  
Old July 26th, 2003, 07:53 PM
vb.net vb.net is offline
Demonic Swordsman DGQB
Dev Shed Novice (500 - 999 posts)
 
Join Date: Apr 2003
Posts: 995 vb.net User rank is Second Lieutenant (5000 - 10000 Reputation Level)vb.net User rank is Second Lieutenant (5000 - 10000 Reputation Level)vb.net User rank is Second Lieutenant (5000 - 10000 Reputation Level)vb.net User rank is Second Lieutenant (5000 - 10000 Reputation Level)vb.net User rank is Second Lieutenant (5000 - 10000 Reputation Level)vb.net User rank is Second Lieutenant (5000 - 10000 Reputation Level)vb.net User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 3 Days 12 h 38 m 28 sec
Reputation Power: 76
How to override Unique Constraint?

//AS of now this problem has been solved.

It's Saturday night and I am working my a$$ off on too many things (at the company site, of course).

Anyway, my partner made the terrible mistake of placing a "UNIQUE CONSTRAINT" on a column that should be full of duplicate records. This is in Oracle, by the way. So now I have to unplace the unique constraint in order to insert some data. I tried to drop the table, but there were reference keys to other existing tables, so I dared not to mess with it too much.

So how can I make a unique column not unique any more, as painless as possible?

Last edited by vb.net : July 26th, 2003 at 07:57 PM.

Reply With Quote
  #2  
Old July 26th, 2003, 08:41 PM
MattR MattR is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Location: High above the mucky-muck (Columbus, OH)
Posts: 266 MattR User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Send a message via ICQ to MattR
What did you do to resolve it?

Reply With Quote
  #3  
Old July 26th, 2003, 11:05 PM
victorpendleton victorpendleton is offline
Contributing User
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jan 2003
Location: No es importante
Posts: 2,065 victorpendleton User rank is Private First Class (20 - 50 Reputation Level)victorpendleton User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 6 h 31 m 56 sec
Reputation Power: 8
alter table table-name disable constraint-name
or
alter table table-name drop contstrain-name

Reply With Quote
  #4  
Old July 27th, 2003, 01:18 AM
vb.net vb.net is offline
Demonic Swordsman DGQB
Dev Shed Novice (500 - 999 posts)
 
Join Date: Apr 2003
Posts: 995 vb.net User rank is Second Lieutenant (5000 - 10000 Reputation Level)vb.net User rank is Second Lieutenant (5000 - 10000 Reputation Level)vb.net User rank is Second Lieutenant (5000 - 10000 Reputation Level)vb.net User rank is Second Lieutenant (5000 - 10000 Reputation Level)vb.net User rank is Second Lieutenant (5000 - 10000 Reputation Level)vb.net User rank is Second Lieutenant (5000 - 10000 Reputation Level)vb.net User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 3 Days 12 h 38 m 28 sec
Reputation Power: 76
I deleted the column and re-created it.

ALSO, can I rename a column or table without deleting and recreating?

Reply With Quote
  #5  
Old July 27th, 2003, 02:53 PM
victorpendleton victorpendleton is offline
Contributing User
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jan 2003
Location: No es importante
Posts: 2,065 victorpendleton User rank is Private First Class (20 - 50 Reputation Level)victorpendleton User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 6 h 31 m 56 sec
Reputation Power: 8
You can rename a table in Oracle. From Oracle 9i and on can you rename a column.

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesDatabase Management > How to override Unique Constraint?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

IBM developerWorks




© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway