Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Can't create table with check constraint

user1285731418 hours ago

I'm using Oracle Apex SQL Workshop → SQL Commands to create a table:

CREATE TABLE "PROJECT2_USERS"
( "ID" NUMBER(38,0) NOT NULL ENABLE,
"PROJECT_ID" NUMBER(38,0) NOT NULL ENABLE,
"SYUS_ID" NUMBER(38,0) NOT NULL ENABLE,
"TYPE" CHAR(1 BYTE) NOT NULL ENABLE,
CONSTRAINT "PROJECT2_USERS_PK" PRIMARY KEY ("ID")
CONSTRAINT "PROJECT2_USERS_CHK1" CHECK (TYPE IN ('R','C','T','U')) ENABLE,
CONSTRAINT "PRO2U_PROJ_FK" FOREIGN KEY ("PROJECT_ID")
REFERENCES "PROJECTS2" ("ID") ENABLE
) ;

COMMENT ON COLUMN "PROJECT2_USERS"."TYPE" IS 'R - Readers, U - Users, C - Steering Commitee, T - Team';

However this results in an error when I run it:

Error at line 7/3: ORA-00907: missing right parenthesis

I've checked it several times and the parenthesis is OK. Please let me know how to fix this error.

Thank you

This post has been answered by jariola on Oct 29 2025
Jump to Answer
Comments
Post Details
Added 18 hours ago
2 comments
31 views