Search code examples
oracle-databaseoracle-xeora-00907

ORA-00907 when trying to create a CHECK constraint


I am trying to create a check contraint on a table by executing the following SQL statement:

alter table "ApplicationConfiguration" add
constraint APPLICATIONCONFIGURATION_CK1
CHECK (ValueType IN ('string', 'int', 'decimal, 'date', 'time', 'datetime', 'binary'))

but I get the following error:

ORA-00907: Missing right parenthesis

I am completely lost. What am I doing wrong?

Additional information:

  • The ApplicationConfiguration table exists and has a column of type nvarchar(32) not null named ValueType
  • Database is Oracle 10g Express Release 10.2.0.1.0
  • I am executing the statement by using the web client (Application Express 2.1.0.00.39)
  • The database user has DBA rights

Thank you!


Solution

  • The Errormessage is right!

    decimal misses a <'> at the End in

    CHECK (ValueType IN ('string', 'int', 'decimal, ...