- 博客(10)
- 收藏
- 关注
原创 mac安装指定版本jDK
在mac上使用brew命令上打算安装jdk 1.8版本,所以使用brew cask install java命令安装,结果安装的是java 10,java 10 很多插件不能用,比如 gradle ,所以没办法,就百度了各种方式去查brew 命令如何安装别的版本的jdk,但是网上的方法都不可行,参考了brew cask install caskroom/versions/java8但是报错Error: caskroom/versions was moved. Tap homebrew/cask-ve
2020-11-19 18:01:58 1441
原创 mysql 1292 - Truncated incorrect INTEGER
错误信息 1292 - Truncated incorrect INTEGER value: 'F161200101008'源代码是这样的INSERT INTO ca_pay_batch ( BATCH_NO, BATCH_DATE , LOAN_CNT, SUC_CNT, FAIL_CNT, AMOUNT_SUM, STATUS, CREATER,
2017-01-13 14:16:55 3473
转载 常用DBA脚本
常用DBA脚本1、查看表空间的名称及大小 select t.tablespace_name, round(sum(bytes/(1024*1024)),0) ts_size from dba_tablespaces t, dba_data_files d where t.tablespace_name = d.tablespace_name group by t.tab
2016-08-03 14:14:14 1332
原创 mysql实现oracle 分析函数row_number()over()
需求:对分组内的流水记录进行排序 这里根据日期进行排序代码如下:SELECT b.app_no, b.payment_date, b.fact_payment_date, IF(@deptno = b.app_no, @rn := @rn + 1, @rn := 1) AS rn,
2016-05-20 10:05:53 2472
原创 exists ,not exists改写成in 和 not in 时,要注意null值的情况,会影响结果
---not existsselect count(distinct a.pos_mer_id)from tests awhere a.stat_flag='C' and not exists(select 1 fromhfods.tests bwhere b.stat_flag='N' and b.pos_mer_id=a.pos_mer_id);改写成no
2015-08-30 12:54:05 1301 3
原创 点到点距离
--建表语句和数据CREATE TABLE DISTANCE_TT( ODF1 NUMBER, ODF2 NUMBER, DISTANCE NUMBER);INSERT INTO DISTANCE_TT(ODF1, ODF2, DISTANCE) VALUES (9,10,4);INSERT INTO DISTANCE_TT(ODF1, ODF2, DIS
2015-04-17 17:06:14 615
原创 行转列小练习
原始数据:select * from date_tab;目标格式:解法一:select year, Sum(case when month =1 then amount end) as m1, Sum(Case when month=2 then amount end) as m2, Sum(Case when month=3 then
2015-03-24 13:33:15 433
转载 A点出发到各地的路径及其距离
求所有的可能路径及距离,样例数据如下:[sql] view plaincopywith bus as ( select 1 id, 'A' dstart, 'B' dend, '120' distance from dual union all select 2 id, 'B' dstart, 'C' dend, '200' distance from dual
2015-03-23 17:20:49 475
原创 oracle 100以内质数
WITHTAS(SELECTROWNUMRNFROMDUALCONNECTBYLEVELselect*fromtwherernnotin(SELECTdistincta.RNFROMTa,tbWHEREmod(a.rn,b.rn)=0anda.rn>1andb.rn>1anda.rn>b.rn
2015-03-23 17:07:38 724
转载 求100以内的质数
WITH T AS (SELECT ROWNUM RN FROM DUAL CONNECT BY LEVEL SELECT RN FROM T WHERE RN > 1 MINUS SELECT A.RN * B.RN FROM T A, T B WHERE A.RN 1 AND B.RN > 1;
2015-03-23 16:27:52 418
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人