java–JDBC–连接数据库并写入数据

1. 数据库连接

2. 使用Statement类进行数据库操作

 

3. 使用PreparedStatement类进行数据库操作

 

4. 测试ResuleSet 结果集