[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Column failed to delete

Posted on 2007-04-11
4
Medium Priority
?
1,551 Views
Last Modified: 2013-12-18
I got htis error message when I tried to delete this column but unsure how to narrow effect the deletion of this column successfully. Below is the error message I got:

SQL> --Removing VDS_KEY from Table VA_VULNERABILITIES table  

ALTER TABLE VA_VULNERABILITIES DROP (VDS_KEY)
;SQL> SQL>   2  
ALTER TABLE VA_VULNERABILITIES DROP (VDS_KEY)
                                     *
ERROR at line 1:
ORA-12991: column is referenced in a multi-column constraint

Please advice.
0
Comment
Question by:jbfannie
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 42

Assisted Solution

by:dqmq
dqmq earned 1000 total points
ID: 18892383
Look at your foreign key constraints for VA_VULNERABILITIES.  Odds are, one of them includes VDS_KEY.  Drop that constraint first, then you can drop the column.
0
 
LVL 42

Assisted Solution

by:dqmq
dqmq earned 1000 total points
ID: 18892415
If not a foreign key, the VDS_KEY could be part of the primary key or a unique constraint. However, dropping either of those has far more serious implications.
0
 
LVL 32

Assisted Solution

by:awking00
awking00 earned 400 total points
ID: 18892448
To find the constraint -
select constraint_name from user_cons_columns
where table_name = 'VA_VULNERABILITIES'
and column_name = 'VDS_KEY';
0
 
LVL 3

Accepted Solution

by:
imaredia earned 600 total points
ID: 18903721
You are attempting to drop this column which is referenced by some other constraints, so to drop this column you can use either of the two ways below:
   1. Drop all the constraints referencing this column and then try to drop this column.  OR
   2. Use CASCADE CONSTRAINTS in your statement.

To find out which constraints are being referenced to this column use the query given by awking00.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question