1.导入驱动包,加载具体驱动类Class.forName(“具体驱动类”);
2,与数据库建立连接connection=DriverManager.getConnecthon();
3,通过connection,获得操作数据库的对象(Statement\preparedStatement\callablestatement)
4,(查询)处理结果集rs=pstmt.executeQuery()
jdbc总结
最新推荐文章于 2021-08-18 18:03:32 发布
1.导入驱动包,加载具体驱动类Class.forName(“具体驱动类”);
2,与数据库建立连接connection=DriverManager.getConnecthon();
3,通过connection,获得操作数据库的对象(Statement\preparedStatement\callablestatement)
4,(查询)处理结果集rs=pstmt.executeQuery()