I am trying to create a table with partitions but, I constantly get the same error. The exact oracle version is 12.1.0.2.0
create table toys (
name varchar2(10),
weight number,
color varchar2(10),
PRIMARY KEY (name)
)
partition by list (color) partitions (
partition p_green values ('green'),
partition p_red values ('red')
);
Is there some other prerequisite that must be done before I can created a partitioned table ?
CodePudding user response:
VALUES keyword is required:
create table toys (
name varchar2(10),
weight number,
color varchar2(10),
PRIMARY KEY (name)
)
partition by list (color) -- partitions -- removed
-- automatic
(
partition p_green VALUES('green'),
partition p_red VALUES('red')
--,partition p_def VALUES(DEFAULT)
);