|
|
create table students (id
char(7) not null, class char(2)
not null, no int unsigned not null,
name char(33) not null, unique
class_no (class, no), primary key
(id));
create table marks (id
char(7) not null, subject char(8)
not null, mark int unsigned not
null, primary key (id, subject),
foreign key (id) references students(id)
on update cascade on delete restrict);
|