摘要: (1)导入jar并加载驱动 Class.forName("com.mysql.jdbc.Driver");(2)获取连接 connection=DriverManager.getConnection("jdbc:mysql://localhost:3306/mytest","root","root" 阅读全文
posted @ 2021-05-08 08:36 大茜茜 阅读(202) 评论(0) 推荐(0)
摘要: //(1)导入jar并加载驱动 Class.forName("com.mysql.jdbc.Driver"); //(2)获取连接 Connection connection=DriverManager.getConnection("jdbc:mysql://localhost:3306/mytes 阅读全文
posted @ 2021-05-08 08:35 大茜茜 阅读(738) 评论(0) 推荐(0)
摘要: JDBC1、使用jdbc中Statement实现增删改第一步:导入jar第二步:Class.forName("驱动类");第三步:Connection connection=DriverManager.getConnection("连接路径","账号","密码");第四步: Statement st 阅读全文
posted @ 2021-05-06 09:31 大茜茜 阅读(94) 评论(0) 推荐(0)