/**
* jdbc 查询语句 Student类省略
*/
import Day01.Text03.Student;
import java.sql.*;
public class Deom {
public static void main(String[] args) {
Connection conn = null;
Statement statement = null;
ResultSet resultSet = null;
try {
/**
* 注册驱动
*/
Class.forName("com.mysql.jdbc.Driver");
/**
* 获得数据库连接对象
*/
conn = DriverManager.getConnection("jdbc:mysql:///my_db", "root", "hao");
/**
jdbc 查询语句
最新推荐文章于 2023-05-17 15:32:12 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)