You are on page 1of 1

create table Student(

Student_Id int(5) not null auto_increment,


Student_Name varchar(100) not null,
Mobile_NO varchar(10) ,
primary key (Student_Id)
);

create table Subject(


Subject_Id int(6) not null,
Subject varchar(100) not null,
primary key (Subject_Id)
);

create table Student_Marks(


Student_Id int(5) not null auto_increment,
Subject_Id int(6) not null,
Marks int(3) not null,
//
primary key (Student_Id,Subject_Id)
//
foreign key (Student_Id) references Student (Student_Id),
foreign key (Subject_Id) references Subject (Subject_Id)
);

You might also like