上一页 1 ··· 80 81 82 83 84 85 86 87 88 ··· 202 下一页
摘要: 在开发过程中,程序提供的功能由简单变得复杂,承担功能的主要类也会因此变得庞大臃肿,如果不加以维护,就会散发出浓重的代码味道。下面这篇博文,主要讲述了利用Enum,反射等手段简化重构代码的过程。 代码涉及的工程是一个基于Webhook调用的项目,Webhook可以简单理解为网络上文件和文件夹的创生和监 阅读全文
posted @ 2020-04-18 08:28 逆火狂飙 阅读(148) 评论(0) 推荐(0)
摘要: 表结构: create table hy_product( id number(9,0) primary key, name nvarchar2(20) not null, price integer not null); 数据: insert into hy_product(id,name,pri 阅读全文
posted @ 2020-04-16 15:12 逆火狂飙 阅读(184) 评论(1) 推荐(0)
摘要: --期盼值 找出AA,3;PDST,3;QPL-,3;TP-,2; --基本表 create table tb_product( id number(9,0) primary key, name nvarchar2(20) not null); --基本表充值 insert into tb_prod 阅读全文
posted @ 2020-04-16 00:29 逆火狂飙 阅读(278) 评论(1) 推荐(0)
摘要: package util; import java.text.SimpleDateFormat; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; import java.util.Date; pub 阅读全文
posted @ 2020-04-15 08:56 逆火狂飙 阅读(463) 评论(1) 推荐(0)
摘要: 建表及充值: create table hy_emp( id number(9,0) primary key, name nvarchar2(20) not null, salary integer not null); insert into hy_emp select rownum,dbms_r 阅读全文
posted @ 2020-04-14 17:05 逆火狂飙 阅读(153) 评论(0) 推荐(0)
摘要: With语句可以在查询中做成一个临时表/View,用意是在接下来的SQL中重用,而不需再写一遍。 With Clause方法的优点: 增加了SQL的易读性,如果构造了多个子查询,结构会更清晰。 示例: with soloemp as (select distinct salary from hy_e 阅读全文
posted @ 2020-04-14 16:46 逆火狂飙 阅读(1072) 评论(0) 推荐(0)
摘要: 在 https://www.cnblogs.com/xiandedanteng/p/12677688.html 中我列举了三种求中值方案,其中日本人MICK的做法因为不适用于二百万结果集而放弃,取而代之是新方案一。 新方案一: 经过思考后我又得出了一种中值的新解法,那就是利用排序后正向序列和反向序列 阅读全文
posted @ 2020-04-12 14:16 逆火狂飙 阅读(211) 评论(3) 推荐(0)
摘要: 我对技术一般抱有够用就好的态度,一般在网上或者书上找了贴合的解决方案,放到实际中发现好用就行了,不再深究,等出了问题再说。 因此,我对Oracle中中形成有效序列的方法集中在rownum,row_number和rank三种方式,其中rank以简短写法(相对于row_number)和不会加深层次(相对 阅读全文
posted @ 2020-04-12 13:28 逆火狂飙 阅读(774) 评论(0) 推荐(0)
摘要: 以前做过一个一千六百万大表增添字段实验https://www.cnblogs.com/xiandedanteng/p/12323537.html,实验证明表无论大小增添字段都很快,或者说增添字段的耗时与表规模无关。 但上次表字段有点少,于是这次把表增加到了21字段再实验。 表结构: create t 阅读全文
posted @ 2020-04-11 18:42 逆火狂飙 阅读(467) 评论(0) 推荐(0)
摘要: 解法1:这是日本人MICK在其著作《SQL进阶教程》里提出的方法: select avg(distinct salary) from ( select t1.salary from tb_employee t1,tb_employee t2 group by t1.salary having sum 阅读全文
posted @ 2020-04-11 08:58 逆火狂飙 阅读(509) 评论(4) 推荐(0)
上一页 1 ··· 80 81 82 83 84 85 86 87 88 ··· 202 下一页
生当作人杰 死亦为鬼雄 至今思项羽 不肯过江东