-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest.sql
More file actions
34 lines (32 loc) · 737 Bytes
/
Copy pathtest.sql
File metadata and controls
34 lines (32 loc) · 737 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
CREATE DATABASE practice;
CREATE TABLE practice.student (
Id_No varchar(10) NOT NULL,
Name varchar(30),
Mobile varchar(11),
email varchar(30),
PRIMARY KEY(Id_No)
);
CREATE TABLE practice.subject_1(
attendence int(11),
class int(10),
mid int(11),
final int(11),
Id_No varchar(10),
FOREIGN KEY (id_no) REFERENCES student(id_no)
);
CREATE TABLE practice.subject_2(
attendence int(11),
class int(10),
mid int(11),
final int(11),
Id_No varchar(10),
FOREIGN KEY (id_no) REFERENCES student(id_no)
);
CREATE TABLE practice.subject_3(
attendence int(11),
class int(10),
mid int(11),
final int(11),
Id_No varchar(10),
FOREIGN KEY (id_no) REFERENCES student(id_no)
);