Drop A Check Constraint
I applied a check constraint to a column as
CREATE TABLE PARTY_MASTER (
Party_Id int PRIMARY KEY,
Party_Name varchar(20) NOT NULL,
Party_Addr_Id int FOREIGN KEY references PARTY_ADDRESS(Party_Addr_Id),
Zone varchar(5),
Status char(1) CHECK (Status IN ('A','I')),
Effective_Date datetime NOT NULL CHECK (Effective_Date > '12/01/2007'))
Now I want to drop the check constraint on column 'Effective_Date'. But I coudnt find any query which shows how to drop a check constraint without a 'Constraint Name'.
Status:
Open Dec 10, 2007 - 09:27 AM
web development, information technology, Databases
2answers
Answers
May 08, 2008 - 03:01 PM
You can not drop a check constraint without a 'Constraint Name'.
1) In Oracle, you can get constraint_name from user_constraints or user_col_constraints.
2) Alternatively, you can delete that column first:
ALTER TABLE table_name DROP COLUMN column_name
then re_add that column:
ALTER TABLE table_name ADD column_name ......
Mar 04, 2009 - 06:02 AM
The question looks to be abandoned by the user who asked it. If no action is taken within 2 days, a Quomon Moderator will consider closing the question and distributing the points.
The Quomon Team
Answer this question
Share Your Own Experience & Expertise
We look to ensure that every question is answered by the best people with relevant expertise and experience, the best answers include multiple perspectives. Do you have relevant expertise or experience to contribute your answer to any of these commonly asked questions?
Add New Comment