上一页 1 ··· 14 15 16 17 18
摘要: BaseDao优化2种方法 1、 try { //读取配置文件,配置文件保存了数据库的东西 String path=”database.properties”; //创建实例化对象 Properties properties = new Properties(); 单例封装配置文件 阅读全文
posted @ 2018-09-07 21:29 登风360 阅读(182) 评论(0) 推荐(0) 编辑
摘要: Jdbc 连接数据库 Jdbc连接数据库步骤 1. 通过反射加载驱动 2. 获取连接 得到connection 3. 写sql语句 4. 获取执行sql对象(statment preparestament)增删改通过连接conn对象获得sql对象preparestament 5. 替换占位符 6. 阅读全文
posted @ 2018-09-06 22:04 登风360 阅读(199) 评论(0) 推荐(0) 编辑
摘要: Or或者查询 select from *表名 where 分数=60 or 分数= 90; is null 判断当前字段是否有值 模糊查询:select * from student where ename like “%zl%”; 查询每组的最高分:select gradeName, max(sr 阅读全文
posted @ 2018-09-04 19:03 登风360 阅读(169) 评论(0) 推荐(0) 编辑
上一页 1 ··· 14 15 16 17 18