Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Alter Constraints

Status
Not open for further replies.

ChrisQuick

Programmer
Oct 4, 1999
144
US
Is it possible to alter the definition of an existing constraint or do you have to drop it and then recreate it? [sig][/sig]
 
What is the syntax of altering the constraints..including the dropping part.
 
To drop a constraint.

[tt]ALTER TABLE dept DROP CONSTRAINT pk_dept;[/tt]

and to add it again.

[tt]ALTER TABLE dept ADD CONSTRAINT pk_dept PRIMARY KEY deptno;[/tt]

Mike
michael.j.lacey@ntlworld.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top