2014-03-30 148 views
0

第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, 
); 
+2

您在'editions_pages'的定義的最後一行有額外的逗號。當然,約束也沒有定義,這也會導致問題。 –

回答

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()的。你應該用正確的數據庫標記問題。