少年阿賓那些青春的歲月 |
摘要: 刪除回滾段 當(dāng)回滾段不再需要或要重建以改變INITIAL,NEXT或MINEXTENTS參數(shù)時,可以將其刪除。要刪除回滾段,不許使該回滾段離線。 語法: DROP ROLLBACK SEGMENT rollback_segment; 例: DROP ROLLBACK SEGMENT rbs01; 查詢回滾段的信息 所用數(shù)據(jù)字典:DB... 閱讀全文
ORA-01555:快照過舊。 一個對于Oracle DBA來說最經(jīng)典問題。 看到網(wǎng)上有個同學(xué),舉例說明,覺得不錯,拿來用下:
首先說明一下:這是兩個2個東西拉
動態(tài)代理,不是java語言特性, 只是java提供動態(tài)方法攔截的一種方式(工具) 有點類似 hook 動態(tài)代理,只是動態(tài)的通過反射,動態(tài)執(zhí)行目標(biāo)的相關(guān)操作, 當(dāng)然要想實現(xiàn)動態(tài)代理,必須該類有接口(貌似cglib不需要的) 動態(tài)代理,是一種實現(xiàn)方式 多態(tài),是oo語言的特性 多態(tài)表現(xiàn)在重載,一個父類的變量可以引用子類的對象
方法一:
package com.abin.lee.thread; import java.util.Iterator;
摘要: 教你如何迅速秒殺掉:99%的海量數(shù)據(jù)處理面試題
作者:July出處:結(jié)構(gòu)之法算法之道blog
前言
一般而言,標(biāo)題含有“秒殺”,“99%”,“史上最全/最強(qiáng)”等詞匯的往往都脫不了嘩眾取寵之嫌,但進(jìn)一步來講,如果讀者讀罷此文,卻無任何收獲,那么,我也甘... 閱讀全文
1、oracle正則表達(dá)式很強(qiáng)大喲,去掉字符串的(如果字符串開頭和結(jié)尾存在"雙引號的話)起頭和結(jié)尾的雙引號
select regexp_replace('"1234"456"','^(")|(")$','') from dual; 2、過濾掉字段里面的所有大小寫字母,大小寫字母通殺 select regexp_replace(t.address,'^[a-z]+|[A-Z]+$','') from abin7 t; 1、cat命令: 功能:1)顯示整個文件。 示例: $ cat fileName 2)把文件串連接后傳到基本輸出,如將幾個文件合并為一個文件或輸出到屏幕。 示例: $ cat file1 file2 > file 說明:把檔案串連接后傳到基本輸出(屏幕或加 > fileName 到另一個檔案) 2、more命令: 以百分比的形式查看日志。
3、less命令: 跟more功能差不多,只不過less支持前后翻閱文件。
4、head命令: 功能:從文本文件的頭部開始查看,head 命令用于查看一個文本文件的開頭部分。 示例如下: 5、tail命令: 功能:tail 命令用于顯示文本文件的末尾幾行。 示例如下: tail example.txt 顯示文件 example.txt 的后十行內(nèi)容; tail -n 50 -f example.txt 顯示文件 example.txt 的后50行內(nèi)容并在文件內(nèi)容增加后,自動顯示新增的文件內(nèi)容。 tail詳解: 如何快速處理十萬條數(shù)據(jù)到數(shù)據(jù)庫
create table abin6(id integer, name nvarchar2(100), score integer, constraint pk_abin6 primary key(id)); create table abin7(id integer, address nvarchar2(100), sid integer, constraint pk_abin7 primary key(id), constraint fk_abin7 foreign key (sid) references abin6(id) ); select * from abin6 t left join abin7 s on t.id=s.sid and t.id=1; select * from abin6 t left join abin7 s on t.id=s.sid where t.id=1; select * from abin6 t,abin7 s where t.id=s.sid(+) ; select * from abin6 t,abin7 s where t.id(+)=s.sid; select * from abin6 t,abin7 s where s.sid(+)=t.id; select * from abin6 t,abin7 s where s.sid=t.id(+); select * from abin6 t inner join abin7 s on t.id=s.sid; select * from abin6 t union select * from abin7 s where exists (select * from abin6 k where s.sid=k.id and k.id =1); select * from abin6 t full join abin7 s on t.id=s.sid; select * from abin7 s full join abin6 t on s.sid=t.id; select * from abin6 natural join abin7; select * from abin6 t cross join abin7; 以下兩句是等價查詢: select * from abin6 t where id=1 or id=2; select * from abin6 t where t.id=1 union all select * from abin6 s where s.id=2; 一。查找重復(fù)記錄 1。查找全部重復(fù)記錄 select * from abin4 s where s.name in (select t.name from abin4 t group by t.name having count(t.name)>1); select * from abin4 s where exists (select * from abin4 t where t.name=s.name group by t.name having count(t.name)>1 ); 2。過濾重復(fù)記錄(只顯示一條) select * from abin4 s where s.id in (select max(id) from abin4 t group by t.name ); 二。刪除重復(fù)記錄 1。刪除全部重復(fù)記錄(慎用) Delete 表 Where 重復(fù)字段 In (Select 重復(fù)字段 From 表 Group By 重復(fù)字段 Having Count(*)>1) 2。保留一條(這個應(yīng)該是大多數(shù)人所需要的 ^_^) Delete HZT Where ID Not In (Select Max(ID) From HZT Group By Title) 注:此處保留ID最大一條記錄 http://blog.csdn.net/csskysea/article/details/6987760 UNION 指令的目的是將兩個 SQL 語句的結(jié)果合并起來,可以查看你要的查詢結(jié)果. |