Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ORA-00906: missing left parenthesis

Tags:

oracle

create table widep(
 cac NUMBER,
 ddate DATE,
 dtime TIMESTAMP,
 type VARCHAR2,
 amount NUMBER(10,2),
 constraint qwe foreign key(cac) references cust(cac)
)
like image 221
Tushar Avatar asked Feb 27 '14 08:02

Tushar


1 Answers

The complete error message states Error at CommandLine:5 Column:15 which is this location:

type VARCHAR2,
            ^^^

VARCHAR2 requires a size parameter to define the maximum number of characters. Use something like

create table widep(
 cac NUMBER,
 ddate DATE,
 dtime TIMESTAMP,
 type VARCHAR2(100),
 amount NUMBER(10,2),
 constraint qwe foreign key(cac) references cust(cac)
);
like image 55
Andreas Fester Avatar answered Oct 19 '22 06:10

Andreas Fester