ORA-00901 invalid CREATE command error when creating a Check
754817Sep 6 2010 — edited Sep 6 2010Hi,
I'm trying to create several checks that 1) ensures a dateFrom is earlier than a dateTo in a ROOM reservation table, and 2) ensures the room type is S, D, or F (for single, double or family).
I used the following code versions and got the ORA-00901 invalid CREATE command below.
CREATE DOMAIN BookingDate AS BookDATE
CHECK(datefrom < dateto);
CREATE DOMAIN RoomType_Check AS CHAR(1)
CHECK(VALUE IN ('S', 'F', 'D'));
create or replace bookdate(
check (value in ('S', 'F', 'D'));
I found a number of references telling me to correct the syntax, but not telling me what is wrong with those I have.
Thanks, R
What am I doing wrong?