开发者

Have error while creating table in oracle?

I have an error in creating table with following command:

Create table Sells
(Store_name varchar2(20) no null,
ISBN char(15) not null,
Unit_price number(3,2) not null,
Shipping_fee number(3,2) not null,
primary key(Store_name, ISBN),
foreign key (Store_name) references Bookstore(Name) on delete cascade,
check(Unit_price>0),
foreign key (ISBN) references Books(ISBN) on delete cascade;

It says:

ORA-00907: missing right pare开发者_JS百科nthesis

Not able to figure out where is the mistake. Anyone provide some help on why this is wrong?


create table sells
(
  store_name varchar2(20) not null, 
  isbn char(15) not null, 
  unit_price number(3,2) not null, 
  shipping_fee number(3,2) not null, 
  primary key(store_name, isbn),
  foreign key (store_name) 
    references book_store(name)
      on delete cascade, 
  check(unit_price>0),
  foreign key (isbn) 
    references books(isbn)
    on delete cascade
);


Create table Sells (Store_name varchar2(20) not null, ISBN char(15) not null, Unit_price number(3,2) not null, Shipping_fee number(3,2) not null, primary key(Store_name, ISBN), foreign key (Store_name) references Bookstore(Name) on delete cascade, check(Unit_price>0), foreign key (ISBN) references Books(ISBN) on delete cascade*)*;

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜