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
| DROP TABLE student; CREATE TABLE student ( s_id INT NOT NULL PRIMARY KEY, s_name VARCHAR ( 10 ) NOT NULL, s_sex VARCHAR ( 5 ) NOT NULL, s_age INT NOT NULL ); DELETE FROM student; INSERT INTO student VALUES(1,'胡图图','男',6); INSERT INTO student VALUES(2,'牛爷爷','男',55); INSERT INTO student VALUES(3,'壮壮妈','女',33); INSERT INTO student VALUES(4,'胡英俊','男',32); INSERT INTO student VALUES(5,'壮壮','男',7); INSERT INTO student VALUES(6,'张小丽','女',31); INSERT INTO student VALUES(7,'小怪','男',2);
DROP TABLE teacher; CREATE TABLE teacher ( t_id INT, t_name VARCHAR ( 10 )); DELETE FROM teacher; INSERT INTO teacher VALUES(1,'图图妈'); INSERT INTO teacher VALUES(2,'神厨小福贵'); INSERT INTO teacher VALUES(3,'健康哥哥');
DROP TABLE score; CREATE TABLE score ( s_id INT, c_id INT, s_score INT ); DELETE FROM score; INSERT INTO score VALUES(1,2,90); INSERT INTO score VALUES(1,3,50); INSERT INTO score VALUES(2,1,60); INSERT INTO score VALUES(2,3,80); INSERT INTO score VALUES(3,1,80); INSERT INTO score VALUES(3,2,50); INSERT INTO score VALUES(3,3,80); INSERT INTO score VALUES(4,1,70); INSERT INTO score VALUES(4,2,60); INSERT INTO score VALUES(4,3,70); INSERT INTO score VALUES(5,2,85); INSERT INTO score VALUES(5,3,55); INSERT INTO score VALUES(6,1,95); INSERT INTO score VALUES(6,2,65); INSERT INTO score VALUES(6,3,100);
DROP TABLE course; CREATE TABLE course ( c_id INT PRIMARY KEY, c_name VARCHAR ( 10 ) NOT NULL, t_id INT NOT NULL ); DELETE FROM course; INSERT INTO course VALUES(1,'厨艺',2); INSERT INTO course VALUES(2,'体育',3); INSERT INTO course VALUES(3,'生活',1);
|