码迷,mamicode.com
首页 >  
搜索关键字:duplicate from active database    ( 76794个结果
实验案例:删除文件系统日志组,保留ASM日志组
实验案例:删除文件系统日志组,保留ASM日志组 说明: oracle文件系统迁移至ASM,需要删除文件系统的日志组,只保留ASM日志组。若两者均保留,会出现读写日志性能不平衡状态。向ASM中读写日志要远快于向文件系统中读写日志。 操作步骤: SQL> select * from v$log; --查看到当前日志组为2,第1、3日志组处于INACTIVE状态,脏块已经写完,可以将这...
分类:其他好文   时间:2014-06-01 09:58:48    阅读次数:365
ORACLE分页查询
常见的oracle分页查询实现方式有三种,分别是通过ROWNUM、ROWID、或分析函数实现,本文将以本人在项目中的用户表为例,简述三种分页的实现: 1.根据ROWNUM分页 SELECT TT.*   FROM (SELECT ROWNUM RN, T.*           FROM (SELECT UI.USER_ID,                        UI.NAME...
分类:数据库   时间:2014-06-01 09:55:07    阅读次数:289
T-SQL 操作文件 详解
/*******  导出到excel EXEC master..xp_cmdshell 'bcp SettleDB.dbo.shanghu out c:\temp1.xls -c -q -S"GNETDATA/GNETDATA" -U"sa" -P""' /***********  导入Excel SELECT *  FROM OpenDataSource( 'Microsoft....
分类:数据库   时间:2014-06-01 09:14:39    阅读次数:410
LeetCode: Decode Ways [090]
【题目】 A message containing letters from A-Z is being encoded to numbers using the following mapping: 'A' -> 1 'B' -> 2 ... 'Z' -> 26 Given an encoded message containing digits, determine the total number of ways to decode it. For example, Given encoded ...
分类:其他好文   时间:2014-06-01 08:59:37    阅读次数:258
查询一个月最后一天的总用户数,数据库中没有保存最好一天的数据,就查询本月数据库已存有的最后一天的数据
select total_user from a_user_no where date_time=(select max(date_time) from a_user_no  where  ‘2013-05’+ "'=to_char(date_time,‘yyyy-mm’));   通过max 函数来去5月份出现最大日期的数据...
分类:数据库   时间:2014-06-01 08:53:00    阅读次数:312
Java中检索联系人中有没有今天生日的
查询crm_linkman表中,birthday(数据库中为date类型)字段中,月日为5-31的记录(主要用于检索今天有没有联系人生日) SELECT * FROM crm_linkman WHERE MONTH(birthday) = 5 and DAYOFMONTH(birthday) = 31...
分类:编程语言   时间:2014-06-01 08:52:21    阅读次数:355
LeetCode: Subsets II [091]
【题目】 Given a collection of integers that might contain duplicates, S, return all possible subsets. Note: Elements in a subset must be in non-descending order. The solution set must not contain duplicate subsets. For example, If S = [1,2,2], a solution ...
分类:其他好文   时间:2014-06-01 08:51:06    阅读次数:292
orale 查询每年、每月、每日统计量的sql语句
每年 select to_char(createtime, 'YYYY') 年, count(*) from table  group by to_char(createtime, 'YYYY'); 每季度 select to_char(createtime, 'q') 年, count(*) from table  group by to_char(createtime, 'q'); ...
分类:数据库   时间:2014-06-01 08:48:29    阅读次数:368
MySQL中数据表的增操作
今天学习到表的增操作,写个博客总结一下,PS:下面所有的注释都是我在电脑上全部操作完成后,再复制到记事本上添加的。至于在执行的时候可不可以那样添加注释,就有待考证了。 选择库 mysql> show databases;#查看目前有哪些数据库存在 +--------------------+ | Database | +--------------------+ | inf...
分类:数据库   时间:2014-06-01 05:34:00    阅读次数:453
oracle 日期函数 求年的最后一天、第一天,月的最后一天
add_months(trunc(to_date('2013','yyyy') ,'yyyy'),12)-1  2013年最后一天 trunc(to_date('2013','yyyy') ,'yyyy')  2013年第一天 5月的最后一天  select last_day(to_date('2013-05','yyyy-mm')) d from dual...
分类:数据库   时间:2014-06-01 00:07:37    阅读次数:345
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!