随笔分类 -  oracle

摘要:1. expdp导出步骤 1.1 用sys管理员登录sqlplus [root@hxjk_test_mysql_redis_file oracle]# sqlplus SQL*Plus: Release 11.2.0.1.0 Production on Wed Nov 21 21:49:35 201 阅读全文
posted @ 2018-11-21 22:41 宅山仔 阅读(542) 评论(0) 推荐(0)
摘要:本人用的数据库:oracle 11g,优化器:CBO(基于代价的优化器)。 索引的目标是避免全表扫描,提高查询效率,但有的语句看执行计划会发现并没有走索引,下面分析下几种导致索引失效的原因(不全). 这里建了一张表:SMTS_USER_INFO_DTL 表字段如下: 索引: 原因1:使用了 is n 阅读全文
posted @ 2016-11-01 16:13 宅山仔 阅读(179) 评论(0) 推荐(0)
摘要:trunc(for date) select sysdate from dual; --当前时间 2016/9/7 10:32:04select trunc(sysdate) from dual;--取当天 2016/9/7select trunc(sysdate,'yyyy') from dual 阅读全文
posted @ 2016-09-07 10:43 宅山仔 阅读(3715) 评论(0) 推荐(0)
摘要:2.select REGEXP_SUBSTR('123,456,789', '[^,]+', 1, 3) value from dual; 结果是:789 获取一个多个数值的列,从而能够让结果以多行的形式展示出来 1. select level from dual connect by level 阅读全文
posted @ 2016-07-19 10:43 宅山仔 阅读(1004) 评论(0) 推荐(0)