How to use enums in Oracle?
The above post gives me an option to create a Enum column while creating a table. But I have a table that is having values. I wanted to add another column with Enum values.
ALTER TABLE CARS **(ADD** BODY_TYPE VARCHAR2(20)
CHECK (BODY_TYPE IN ('COUPE','SEDAN','SUV')) );
I'am getting a syntax error near ADD
. Please guide.
Place "add" before "(".
alter table cars
add
(
body_type varchar2(20) not null check (body_type in ('COUPE','SEDAN','SUV'))
);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With