In Oracle 12c, I had a table named "CONTAINERS" and the following query was failing to insert data.
insert into CONTAINERS (ID,CONTAINER_NAME, HIERARCHY_SUB_TYPES_ID, HIERARCHY_TYPES_ID, SEGMENT_ID, SUB_SEGMENT_ID, USERS_ID_HIERARCHY_OWNER)
values (44,'ContainerName', 1, 1, 1, 1, 1);
Error:
Error at Command Line : 1 Column : 28 Error report - SQL Error: ORA-02000: missing ) keyword 02000. 00000 - "missing %s keyword"
But this worked successfully
insert into CONTAINERS values (3,'ContainerName', 1, 1, 1, 1, 1);
I had to rename the table from "CONTAINERS" to "CONTAINER" for everything to work normally.
Can someone explain why I got this behavior?
DDL:
CREATE TABLE "RELANDHIER"."CONTAINERS"
( "ID" NUMBER,
"CONTAINER_NAME" VARCHAR2(200 BYTE),
"USERS_ID_HIERARCHY_OWNER" NUMBER,
"SEGMENT_ID" NUMBER,
"SUB_SEGMENT_ID" NUMBER,
"HIERARCHY_TYPES_ID" NUMBER,
"HIERARCHY_SUB_TYPES_ID" NUMBER
)