韩顺平零基础学Java MySQL student表

 创建学生表

CREATE TABLE student(
	id INT NOT NULL DEFAULT 1,
	NAME VARCHAR(20) NOT NULL DEFAULT ' ',
	chinese FLOAT NOT NULL DEFAULT 0.0,
	english FLOAT NOT NULL DEFAULT 0.0,
	math FLOAT NOT NULL DEFAULT 0.0
	);

添加信息

INSERT INTO student(id, `name`, chinese, english, math) VALUES(1, '韩顺平', 89, 78, 90);
INSERT INTO student(id, `name`, chinese, english, math) VALUES(2, '张飞', 67, 98, 56);
INSERT INTO student(id, `name`, chinese, english, math) VALUES(3, '宋江', 87, 78, 77);
INSERT INTO student(id, `name`, chinese, english, math) VALUES(4, '关羽', 88, 98, 90);
INSERT INTO student(id, `name`, chinese, english, math) VALUES(5, '赵云', 82, 84, 67);
INSERT INTO student(id, `name`, chinese, english, math) VALUES(6, '欧阳锋', 55, 85, 45);
INSERT INTO student(id, `name`, chinese, english, math) VALUES(7, '黄蓉', 75, 65, 30);

上一篇:按照TomCat版本重新配置web.xml文件


下一篇:一对多,多对多,多表查询