随笔分类 -  Oracle

数据库
摘要:查找Clob字段中包含指定记录的方法select count(*) from game_article t where dbms_lob.instr(t.content, utl_raw.cast_to_raw(convert('duowan.com','utf8')), 1, 1) > 0或者select count(*) from game_article t where dbms_lo... 阅读全文
posted @ 2010-03-25 18:49 hellofei 阅读(792) 评论(0) 推荐(0) 编辑
摘要:dbms_lob包学习笔记之三:instr和substr存储过程http://wwwwwfco.itpub.net/post/5073/27882instr和substr存储过程,分析内部大对象的内容instr函数与substr函数instr函数用于从指定的位置开始,从大型对象中查找第N个与模式匹配的字符串。用于查找内部大对象中的字符串的instr函数语法如下:dbms_lob.instr(lob... 阅读全文
posted @ 2010-03-25 15:54 hellofei 阅读(11292) 评论(0) 推荐(0) 编辑
摘要:Oracle中的Raw类型解释http://space.e800.com.cn/sunnyboy/entity/view/?id=17404   RAW,类似于CHAR,声明方式RAW(L),L为长度,以字节为单位,作为数据库列最大2000,作为变量最大32767字节。  LONG RAW,类似于LONG,作为数据库列最大存储2G字节的数据,作为变量最大32760字节  建表操作:  create... 阅读全文
posted @ 2010-03-25 14:44 hellofei 阅读(6944) 评论(0) 推荐(1) 编辑
摘要:java.lang.ClassCastException: oracle.sql.CLOBhttp://spring3000.javaeye.com/blog/372482 Java代码oracle.sql.CLOBclob=null;stmt=conn.createStatement();rs=stmt.executeQuery(sql);if(rs.next()){System.out.pri... 阅读全文
posted @ 2010-03-01 15:21 hellofei 阅读(2070) 评论(0) 推荐(0) 编辑
摘要:如何判断oracle大字段(clob)为空?http://topic.csdn.net/u/20081110/15/094fcaf8-8b93-42c1-b8a9-364dc27f3e55.html--assume x is a clob field --x is null --x equal to empth_clob, dbms_lob.getlength(x) = 0 select * fr... 阅读全文
posted @ 2010-02-23 17:21 hellofei 阅读(5402) 评论(0) 推荐(0) 编辑
摘要:一、ORA-01476: divisor is equal to zero错误:SELECT * FROM tablename WHERE executions > 0AND disk_reads/executions > 500正确:SELECT * FROM tablename WHERE executions > 0AND DECODE(executions, 0, 0,d... 阅读全文
posted @ 2010-02-03 19:19 hellofei 阅读(435) 评论(0) 推荐(0) 编辑
摘要:oracle 日期常用函數 (SYSDATE、日期格式)http://blog.blueshop.com.tw/pili9141/articles/52486.aspx 1SYSDATE2--◎可得到目前系統的時間34ex.5selectsysdatefromdual;67sysdate8----------920-SEP-071011常用之日期格式1213日期格式說明14------... 阅读全文
posted @ 2010-02-03 18:52 hellofei 阅读(1669) 评论(0) 推荐(0) 编辑
摘要:oracle 內建函數-數字常用函數http://blog.blueshop.com.tw/pili9141/articles/52397.aspx 1CEIL(n)2--獲得>n或=n的最小整數34ex.5selectceil(3.01)fromdual;67cil(3.01)8----------941011selectceil(-3.01)fromdual;1213ceil(-3.01... 阅读全文
posted @ 2010-02-03 18:51 hellofei 阅读(331) 评论(0) 推荐(0) 编辑