-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFighterRank.SQL
More file actions
59 lines (44 loc) · 1.18 KB
/
Copy pathFighterRank.SQL
File metadata and controls
59 lines (44 loc) · 1.18 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
create database FighterRank;
use FighterRank;
create table FighterInfo(
FighterID int Primary Key,
FirstName varchar(255),
LastName varchar(255),
NickName varchar(255),
Age int
);
select * from FighterInfo;
truncate table FighterInfo;
drop table FighterInfo;
create table FighterBody(
FighterID int,
Gender varchar(8),
Height varchar(8),
Weight float,
WeightClass enum('Heavyweight', 'LightHeavyweight', 'Middleweight', 'Welterweight',
'Lightweight', 'Featherweight','Bantamweight', 'Flyweight','Strawweight'),
Foreign Key(FighterID) References FighterInfo(FighterID)
);
select * from FighterBody;
truncate table FighterBody;
drop table FighterBody;
create table FighterRecord(
FighterID int,
Wins int,
Losses int,
Draws int,
NoContent int,
Foreign Key(FighterID) References FighterInfo(FighterID)
);
select * from FighterRecord;
truncate table FighterRecord;
drop table FighterRecord;
create table FighterStyle(
FighterID int,
Striking enum('Boxing', 'Karate', 'Kickboxing', 'MuayThai', 'Taekwondo'),
Grappling enum('BJJ', 'Judo', 'Sambo', 'Wrestling'),
Foreign Key(FighterID) References FighterInfo(FighterID)
);
select * from FighterStyle;
truncate table FighterStyle;
drop table FighterStyle;