【文章內(nèi)容簡介】
size=5mb, filegrowth=10% )gouse athletesgocreate table 運(yùn)動(dòng)員 ( 運(yùn)動(dòng)員編號(hào) int primary key not null, 姓名 varchar(20) not null, 性別 varchar(20) default 39。男39。, 年齡 int check (年齡=15 AND 年齡=35))gocreate table 比賽 ( 項(xiàng)目編號(hào) int primary key not null, 運(yùn)動(dòng)員編號(hào) int foreign key(運(yùn)動(dòng)員編號(hào)) REFERENCES 運(yùn)動(dòng)員(運(yùn)動(dòng)員編號(hào)) not null, 項(xiàng)目名稱 varchar(30) unique, 時(shí)間 date not null)gocreate table 教練 ( 教練編號(hào) int primary key not null, 教練名字 varchar(20) not null, 執(zhí)教項(xiàng)目 varchar(20) not null)gocreate table 隊(duì)伍 ( 隊(duì)伍名稱 varchar(50) primary key not null, 教練編號(hào) int foreign key(教練編號(hào)) REFERENCES 教練(教練編號(hào)) not null, 等級(jí) varchar(20) not null, 地點(diǎn) varchar(20) not null)go create table 訓(xùn)練 ( 運(yùn)動(dòng)員編號(hào) int not null, 教練編號(hào) int not null, PRIMARY KEY (運(yùn)動(dòng)員編號(hào), 教練編號(hào)), FOREIGN KEY (運(yùn)動(dòng)員編號(hào)) REFERENCES 運(yùn)動(dòng)員(運(yùn)動(dòng)員編號(hào)), FOREIGN KEY (教練編號(hào)) REFERENCES 教練(教練編號(hào))) 維護(hù)和運(yùn)行要求寫出插入數(shù)據(jù)的SQL語句(每表至少三條記錄)goinsert into 運(yùn)動(dòng)員 values(01,39。姚明39。,39。男39。,30)insert into 運(yùn)動(dòng)員 values(02,39。劉翔39。,39。男39。,20)insert into 運(yùn)動(dòng)員 values(03,39。孫楊39。,39。男39。,18)insert into 運(yùn)動(dòng)員 values(04,39??票?9。,39。男39。,35)insert into 運(yùn)動(dòng)員 values(05,39。李寧39。,39。男39。,32)goinse