Home > OS >  ORA-0092 invalid datatype - cannot find error
ORA-0092 invalid datatype - cannot find error

Time:09-24

Tried to check each data type and fix the error. Tried to also create a table without a primary key, but I still get the same error.

create table Training_MarieS
 (request_id numeric (20) not null, 
  parameter_name varchar2(128 BYTE) not null,
  parameter_value varchar2(128 BYTE) not null,
  service_symbol varchar2(128 BYTE) not null,
  service_type  varchar2(20),
  parameter_description text,
  date_time timestamp not null, 
  CONSTRAINT request_id PRIMARY KEY (request_id)
);

CodePudding user response:

It seems like you're trying to create a table using MySQL datatypes in Oracle. As you've seen, this won't work.

  • Oracle's equivalent of numeric is number
  • Oracle's equivalent of text is clob
create table Training_MarieS
 (request_id NUMBER (20) not null, -- Here!
  parameter_name varchar2(128 BYTE) not null,
  parameter_value varchar2(128 BYTE) not null,
  service_symbol varchar2(128 BYTE) not null,
  service_type  varchar2(20),
  parameter_description CLOB, -- And here!
  date_time timestamp not null, 
  CONSTRAINT request_id PRIMARY KEY (request_id)
);
  • Related