摘要: Statement与PreparedStatement 共同 1.PreparedStatement继承自Statement 2.PreparedStatement中没有close()方法,PreparedStatement的close()继承自Statement 区别 Statement:必须先打 阅读全文
posted @ 2019-12-25 22:24 是非_大道克己 阅读(516) 评论(0) 推荐(0) 编辑
摘要: //1.将mysql的jdbc驱动加载到内存中 try { Class.forName("com.mysql.jdbc.Driver"); } catch (ClassNotFoundException e) { e.printStackTrace(); } //指定需要连接的数据库地址,用户名和密 阅读全文
posted @ 2019-12-25 00:26 是非_大道克己 阅读(275) 评论(0) 推荐(0) 编辑