随笔分类 -  oracle

oracle数据库子查询的结果需要使用多次解决办法
摘要:with c as (select a.trandt,sum(a.tranam) tranam from tran a group by a.trandt )--将子查询抽取出来,以后可以直接用。该方法只适用于oracle,mysql不支持 select c.trandt, sum(d.tranam) from c inner join c d on c.trandt >= d... 阅读全文
posted @ 2019-06-25 14:35 改变一下 阅读(1142) 评论(0) 推荐(0)
oracle导入导出命令
摘要:导出命令:exp 用户名/密码@数据库 owner=用户名 file=xxx.dmp 导入命令:imp 用户名/密码@数据库 fromuser=用户名 touser=用户名 file=dmp文件路径 比如:exp test/testpwd@192.168.1.1/orcl owner=test fi 阅读全文
posted @ 2019-06-04 15:30 改变一下 阅读(104) 评论(0) 推荐(0)
oracle日志相关的表
摘要:SELECT * FROM all_objects t where object_name like '%EN_CONCAT_IM%';DBA_HIST_SQLTEXTDBA_HIST_SQLSTATDBA_HIST_ACTIVE_SESS_HISTORYv$sqlarea 阅读全文
posted @ 2017-12-12 11:46 改变一下 阅读(198) 评论(0) 推荐(0)
oracle 常用函数
摘要:1.今天遇到需要求当前日期和下个日期的需求,直接可以利用oracle函数获得 add_months()函数 参数 负数 代表 往前 正数 代表 往后。 select to_char(add_months(trunc(sysdate),0),'yyyymm') , to_char(add_months 阅读全文
posted @ 2017-08-30 15:12 改变一下 阅读(117) 评论(0) 推荐(0)