摘要: ROW_NUMBER() OVER(partition by col1 order by col2) 将返回结果分组编号,将返回结果以col1字段分组,每个组内按照col2排序,并将这些分组排序后的记录编号,每个组内从1开始独立编号。 如有表T_1如下: 执行SQL: 将得到如下结果: 上述结果是将 阅读全文
posted @ 2016-07-13 17:02 LinuSiyu 阅读(200) 评论(0) 推荐(0) 编辑
摘要: public static List resultSetToList(ResultSet rs) throws java.sql.SQLException { if (rs == null) return Collections.EMPTY_LIST; ResultSetMetaData md = rs.getMetaData(); // 得到结果... 阅读全文
posted @ 2016-07-13 10:37 LinuSiyu 阅读(193) 评论(0) 推荐(0) 编辑
摘要: 一、 instr函数判断某个字符串中是否含有指定子串。 在一个字符串中查找指定的子字符串,返回子字符串的位置。 语法: instr(sourceString,destString,start,appearPosition) instr('源字符串' , '目标字符串' ,'开始位置','第几次出现' 阅读全文
posted @ 2016-07-13 10:33 LinuSiyu 阅读(246) 评论(0) 推荐(0) 编辑