缺少左括号

时间:2014-03-30 12:12:23

标签: oracle parentheses

第9行缺少左括号。看不到错误!

create table EDITIONS(  
        ID number NOT NULL,  
        ID_VOLUME number,               
        Publishing varchar2(20),                
        Year number(4),                 
        Language varchar2(10),              
        Pages number(4),        
        CONSTRAINT  pk_editions PRIMARY KEY,        
        constraint  fk_editions_volume foreign key (id_volume)
                references volume(id),  
        constraint  editions_publishing,  
        constraint  editions_year,  
        constraint  editions_language,  
        constraint  editions_pages,  
);

1 个答案:

答案 0 :(得分:2)

尝试这样的事情:

create table EDITIONS (
    ID number NOT NULL primary key
    ID_VOLUME number,
    Publishing varchar2(20),
    Year number(4),
    Language varchar2(10),
    Pages number(4),
    constraint fk_editions_volume foreign key (id_volume) references volume(id)
);

由于Oracle,我假设您使用varchar2()。您应该使用正确的数据库标记问题。