Oct 20, 2000 #1 ChrisQuick Programmer Joined Oct 4, 1999 Messages 144 Location 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]
Is it possible to alter the definition of an existing constraint or do you have to drop it and then recreate it? [sig][/sig]
Oct 24, 2000 #2 dbachpb MIS Joined Sep 20, 2000 Messages 21 Location CA You must drop and recreate the constraint. [sig][/sig] Upvote 0 Downvote
Oct 24, 2000 Thread starter #3 ChrisQuick Programmer Joined Oct 4, 1999 Messages 144 Location US Thanks [sig][/sig] Upvote 0 Downvote
Dec 5, 2000 #4 callsupratim Programmer Joined Dec 5, 2000 Messages 1 Location JP What is the syntax of altering the constraints..including the dropping part. Upvote 0 Downvote
Dec 6, 2000 #5 MikeLacey MIS Joined Nov 9, 1998 Messages 13,212 Location GB 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 Upvote 0 Downvote
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