Column failed to delete

Posted on 2007-04-11
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  

;SQL> SQL>   2  
ERROR at line 1:
ORA-12991: column is referenced in a multi-column constraint

Please advice.
Question by:jbfannie
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
LVL 42

Assisted Solution

dqmq earned 250 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.
LVL 42

Assisted Solution

dqmq earned 250 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.
LVL 32

Assisted Solution

awking00 earned 100 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';

Accepted Solution

imaredia earned 150 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.

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Updating a temp table inside a PL/SQL block 3 64
oracle query 3 34
how to tune the query 17 82
C# Web service insert into Oracle table 8 37
Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
Introduction A previously published article on Experts Exchange ("Joins in Oracle", makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
This video shows how to recover a database from a user managed backup

734 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