原文:http://desert3.iteye.com/blog/811007-- 不是數字select * from dual where not REGEXP_LIKE('1不是數字1', '^[0-9]+\.{0,1}[0-9]*$')-- 是數字select * from dual where REGEXP_LIKE('1.1',
今天在看oracle 10g的文檔,注意到Irreversible Compatibility這個說法。Starting with Oracle Database 10g, the COMPATIBLE initialization parameter becomes irreversible; that is, it cannot be set to a value that is less than a previous value. Therefore, the
t表中將近有1100萬資料,很多時候,我們要進行字串匹配,在SQL語句中,我們通常使用like來達到我們搜尋的目標。但經過實際測試發現,like的效率與instr函數差別相當大。下面是一些測試結果:SQL> set timing onSQL> select count(*) from t where instr(title,’手冊’)>0;COUNT(*)———-65881Elapsed: 00:00:11.04SQL> select count(*) from t
把從Oracle資料庫匯出的資料匯入到MySql資料庫中1. 使用預設的結束符號匯入到MySql資料庫中: LOAD DATA LOCAL INFILE 'd:/oracle.txt' IGNORE INTO TABLE alarmLog 此時Fields的結束符預設的就是'/t'定位字元,而不是"/t"字串.2. 當設定Fields結束符匯入到MySql資料庫中: LOAD DATA LOCAL INFILE 'd:/oraclea.txt' IGNORE INTO TABLE
我以scott/tiger登入以後建立了表以後插入資料提示我插入成功了,但是在查詢資料的時候是沒有記錄的,原因是我的scott使用者沒有對這個表插入的許可權。這時要以system登入以後用grant賦予scottr 中某個表的相應的許可權。GRANT名稱GRANT— 賦予一個使用者,一個組或所有使用者存取權限GRANTprivilege [, ...] ON object [, ...] TO { PUBLIC | GROUP group | username
oracle 常用功能函數匯總*************************************************************************************************** * SQL Group Functions (num can be a column or expression) * (null values are ignored, default between distinct and
一:oracle 字元集的查看和設定1:查看資料庫伺服器當前字元集參數設定SELECT * FROM v$nls_parameters;或select * from nls_database_parameters或select userenv(‘language’) from dual;查詢結果中NLS_CHARACTERSET表示字元集,NLS_NCHAR_CHARACTERSET表示國家字元集 NLS_LANGUAGE 語言NLS_TERRITORY 地區NLS_CURRENCY
1 move時實驗SQL> create table my_objects_move tablespace ASSM as select * from all_objects where rownum < 20000;Table createdSQL> create index i_my_objects_move on my_objects_move (object_id);Index created SQL> delete from my_objects_move