文件名称:JDBC连接代码
文件大小:2KB
文件格式:JAVA
更新时间:2020-11-28 12:40:10
jdbc
Class.forName(driver); conn = DriverManager.getConnection(url, userName, passWord); String sql = "select * from t_demo_xs where xm = ?"; ps = conn.prepareStatement(sql); ps.setString(1, "liu"); rs = ps.executeQuery();