MariaS
MariaS

Reputation: 25

ORA-0092 invalid datatype - cannot find error

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)
);

Upvotes: 1

Views: 260

Answers (1)

Mureinik
Mureinik

Reputation: 310993

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)
);

Upvotes: 1

Related Questions