ORA-00906: missing left parenthesis

后端 未结 2 1581
我寻月下人不归
我寻月下人不归 2021-01-11 16:44
create table widep(
 cac NUMBER,
 ddate DATE,
 dtime TIMESTAMP,
 type VARCHAR2,
 amount NUMBER(10,2),
 constraint qwe foreign key(cac) references cust(cac)
)
         


        
2条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-11 17:18

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

提交回复
热议问题