Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Check Constraint
No, there is no alter table modify constraint.
You have to drop and recreate the check constraint: alter table media drop constraint media_type_check; alter table media add constraint media_type_check check (mediatype in ('Audio', 'Video', 'Picture', 'Macromedia','Executables'));
Regards.
wolfgang karrer a écrit dans le message <37B8EF91.27566F23_at_ce.uni-linz.ac.at>...
>How can i change a check constraint of a table
>:
>example:
>CREATE TABLE MEDIA
> (mediaNr INTEGER PRIMARY KEY,
> object BLOB NOT NULL,
> playtime INTEGER NOT NULL,
> mediatype VARCHAR2(10),
> constraint media_type_check
> check (mediatype in ('Audio', 'Video', 'Picture')));
>
>in
>CREATE TABLE MEDIA
> (mediaNr INTEGER PRIMARY KEY,
> object BLOB NOT NULL,
> playtime INTEGER NOT NULL,
> mediatype VARCHAR2(10),
> constraint media_type_check
> check (mediatype in ('Audio', 'Video', 'Picture',
>'Macromedia','Executables')));
>
>Is there an ALTER TABLE MODIFY CONSTRAINT available??
>
>Thanks
>
>
>
Received on Tue Aug 17 1999 - 03:15:55 CDT