Tag Info

New answers tagged

1

I think you want this: ALTER TABLE TRUCK ADD (ttype VARCHAR2(6) CONSTRAINT con_type CHECK (ttype in('SMALL','MEDIUM','LARGE')) );


0

There is no ENUM datatype in Oracle. You can use a foreign key constraint to a reference table (with 3 rows) or a CHECK constraint instead: ALTER TABLE truck ADD ttype VARCHAR(6), ADD CONSTRAINT ttype_check CHECK (ttype IN ('SMALL','MEDIUM','LARGE')) ;



Top 50 recent answers are included