1、加载驱动程序
Class.forName(DriverClass);
2、连接数据库
Connection connect = DriverManager.getConnection(DataBase URL);
3、创建语句
Statement statement = connect.createStatement();
4、执行语句
ResultSet rs = statement.executeQuery(SQL语句);
5、处理ResultSet
时间: 2024-10-26 12:10:03