create table widep(
cac NUMBER,
ddate DATE,
dtime TIMESTAMP,
type VARCHAR2,
amount NUMBER(10,2),
constraint qwe foreign key(cac) references cust(cac)
)
答案 0 :(得分:13)
完整错误消息指出Error at Command
Line:5 Column:15
这个位置:
type VARCHAR2,
^^^
VARCHAR2
需要size参数来定义最大字符数。使用像
create table widep(
cac NUMBER,
ddate DATE,
dtime TIMESTAMP,
type VARCHAR2(100),
amount NUMBER(10,2),
constraint qwe foreign key(cac) references cust(cac)
);
答案 1 :(得分:0)
CREATE TABLE widep( cac NUMBER(10,2) not null, date DATE, dtime TIMESTAMP, type VARCHAR2(50), amount NUMBER(10,2), CONSTRAINT cac_fk FOREIGN KEY key(cac) REFERENCES cust(cac) );