Bootstrap

JDBC连接mySQL进行学生信息的查询和插入

1.在数据库中新建表格(做简单的插入)

CREATE DATABASE student;
CREATE TABLE studentinfo( 
  id INT PRIMARY KEY,
  id_name VARCHAR(20),
  gender VARCHAR(20),
  age INT);
 
 INSERT INTO studentinfo(id,id_name,gender,age)VALUES(001,"join","male",19);
 INSERT INTO studentinfo(id,id_name,gender,age)VALUES(002,"mark","male",20);
 INSERT INTO studentinfo(id,id_name,gender,age)VALUES(003,"lily","female",18);
 INSERT INTO studentinfo(id,id_name
;