Latest Tutorials| Questions and Answers|Ask Questions?|Site Map

Home Answers Viewqa SQL foreign key error in sql

Have Programming Question? Ask it here!

foreign key error in sql
0 Answer(s)      3 years and 4 months ago
Posted in : SQL

create table matchdetails(mid varchar2(10),mdate date,team1 varchar2(10),team2 varchar2(10), stadium varchar2(10),city varchar2(10),mom varchar2(10),primary key(mid,mdate);

->the match tablle is created

create table batsman(mid varchar2(10),pid varchar2(10),runs varchar2(10),balls varchar2(10), fours varchar2(10),sixes varchar2(10),primary key(, foreign key(mid) references matchdetails(mid));

->for the above batsman table it shows error on foreign key can any one tell me plz how to reference matchdetails

View Answers

Related Tutorials/Questions & Answers: