oracle
彳卸风
1005524346………………………………………………………………………………………………
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
多字模糊查询优化
举个栗子 查询标题或者 内容包含 A 的数据 传统写法如select * from table1 t where (t.title like '%A%') or (t.neirong like '%A%'); 调整之后写法 select * from table1 t where t.title||t.neirong like '%A%'; where instr(t.title,'A') > 0 or instr(t.neirong,'A')>0 where instr((t..原创 2020-09-04 09:51:15 · 308 阅读 · 0 评论 -
ORACLE_每日创建序列_使用方法实现
-- 使用参数获取今天的日期以及前一天的日期,首先查询序列,如果无则创建,如果有则删除之前序列 CREATE OR REPLACE FUNCTION "FUNC_SC_GET_SEQ" (name IN string,lastName IN string) return number Authid Current_User IS SEQ_NOT_FOUND EXCEPTION; PRAGMA E...原创 2020-01-02 14:57:48 · 310 阅读 · 0 评论 -
oracle_查询优化in改造
数据查询大意为查询历史操作记录汇总的出去某部门之外的创建记录。 原sql中使用方法递归查询方法,耗时较慢继而进行优化。 select count(1) from aa bd,bb d where 1=1 and bd.id=d.b_id and bd.j in ( select distinct th.j from dd th where where 1 =1 ...原创 2019-12-03 09:00:39 · 4434 阅读 · 0 评论
分享