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
| CREATE DATABASE demo;
USE demo;
CREATE TABLE student ( id bigint(20) NOT NULL AUTO_INCREMENT, number varchar(255) NOT NULL, name varchar(255) NOT NULL, age int(11) NOT NULL, chi int(11) NOT NULL, math int(11) NOT NULL, eng int(11) NOT NULL, PRIMARY KEY (id) ) ENGINE=InnoDB AUTO_INCREMENT=138 DEFAULT CHARSET=utf8;
CREATE TABLE user ( id bigint(20) NOT NULL AUTO_INCREMENT, username varchar(255) NOT NULL, password varchar(255) NOT NULL, PRIMARY KEY (id) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
INSERT INTO student (number, name, age, chi, math, eng) VALUES (1,'101','张三',18,99,99,99), (2,'102','李四',19,92,80,55), (3,'103','王五',20,88,79,88), (4,'104','马六',21,75,88,99), (5,'105','赵七',17,88,54,67), (6,'106','陈八',24,87,77,33), (7,'107','朱九',23,91,44,56), (8,'108','小红',8,82,77,90), (9,'109','小强',8,78,67,88), (10,'110','大白',17,73,72,71), (11,'111','小花',20,73,73,88), (12,'112','小新',7,59,59,59), (13,'113','小黄',14,78,99,93);
INSERT INTO user (username, password) VALUES ('abc', '123'), ('111', '123');
|