So tried using an ENUM over instructors favoured ‘CHECK(col_name IN (‘ENUM’, ‘LIST’)) method and got the missing right parentheses error. Could’t figure it out and would appreciate any input. My curiousity is academic, the check condition works fine, so no rush.
SQL> CREATE TABLE service_labour_detail
2 (call_num NUMBER(8),
3 labour_code ENUM('A','B','C','D'),
4 labour_hours NUMBER(3,1) NOT NULL,
5 PRIMARY KEY(call_num, labour_code),
6 FOREIGN KEY(call_num)
7 REFERENCES service_call(call_num));
labour_code ENUM('A','B','C','D'),
*
ERROR at line 3:
ORA-00907: missing right parenthesis
Cheers!
Fraser
enumis not a valid data type in Oracle.enumis a data type in MySQL but, so far as I’m aware, not many other databases support it.