随笔分类 - Develope
JS key大全
摘要:event.keycode值大全keycode8=BackSpaceBackSpace2keycode9=TabTab3keycode12=Clear4keycode13=Enter5keycode16=Shift_L6keycode17=Control_L7keycode18=Alt_L8keycode19=Pause9keycode20=Caps_Lock10keycode27=EscapeE...
阅读全文
JS事件
摘要:onabort 当用户中断下载图像时触发。 onactivate 当对象设置为活动元素时触发。onafterprint 对象所关联的文档打印或打印预览后立即在对象上触发。onafterupdate 当成功更新数据源对象中的关联对象后在数据绑定对象上触发。onbeforeactivate 对象要被设置为当前元素前立即触发。onbeforecopy 当选中区复制到系统剪贴板之前在源对象触发。onbef...
阅读全文
ORACLE中搜索任意字符串
摘要:1createorreplaceproceduresearch(v_colnameinvarchar2,v_findinvarchar2)as2v_sqlvarchar2(2000);3v_resultvarchar2(1000);4v_cursornumber;5v_statnumber;6begin7dbms_output.put_line('表名,列名,结果');8forain(select...
阅读全文
oracle 中grouping函数的应用
摘要:select * from test100001大515200001中2575300001小8525400002大6535500002中9585600002小8525701001大1614801001中29075901001小8322SELECT num ,flg ,(CASE WHEN GROUPING(num)=1 THEN 'TOTAL' WHEN GROUPING(type)=1 THE...
阅读全文
Oracle sql 性能优化调整
摘要:1. 选用适合的ORACLE优化器 ORACLE的优化器共有3种: a. RULE (基于规则) b. COST (基于成本) c. CHOOSE (选择性) 设置缺省的优化器,可以通过对init.ora文件中OPTIMIZER_MODE参数的各种声明,如RULE,COST,CHOOSE,ALL_ROWS,FIRST_ROWS . ...
阅读全文
oracle 调试中使用到的存储过程
摘要:create or replace procedure put_line_unlimit( p_string in varchar2 ) is l_string long default p_string; begin loop exit when l_string is null; dbms_output.put_line( substr( l_string, 1...
阅读全文
ORACLE 8i中实现SYS_CONNECT_BY_PATH函数
摘要:create or replace package hierarchy is type strtabletype is table of varchar2(4000) index by binary_integer; strtable strtabletype; type numtabletype is table of number index by binary_integer; ...
阅读全文
ORACLE中translate的妙用
摘要:下面是文档中的话 The following statement translates a license number. All letters 'ABC...Z' are translated to 'X' and all digits '012 . . . 9' are translated to '9': SELECT TRANSLATE('2KRW229', '01234567...
阅读全文
Oracle 行列转换
摘要:1、固定列数的行列转换 如 student subject grade --------- ---------- -------- student1 语文 80 student1 数学 70 student1 英语 60 student2 语文 90 student2 数学 80 student2 英语 100 …… 转换为 语文 数学 英语 student1 80 70 60 student2 ...
阅读全文
Oracle 嵌套表二
摘要:最近把oracle嵌套表的其他功能仔细看了看并做了个简单整理。 oracle提供两种使用嵌套表的方法: 1. PL/SQL代码中作为扩展PL/SQL语言;(这部分内容就是上边所说oracle内存表是oracle嵌套表的部分功能) 2. 作为物理存储机制,以持久地存储集合。 */ --创建测试表: CREATE TABLE dept (deptno NUMBER(2) PRIMARY...
阅读全文
Oracle 嵌套表
摘要:CREATE type addrs_type IS TABLE OF varchar2(128); create table employye ( eoid number(4),mailaddr addrs_type) nested table mailaddr store as addr_table ; insert into employye values(123,addrs_typ...
阅读全文
Oracle collections
摘要:一、Types of Collections 1、Associative arrays 数组 它是同种类型的一维、无边界的稀疏集合,只能用于 PL/SQL。 DECLARE TYPE t_name IS TABLE OF varchar2(10) INDEX BY PLS_INTEGER; --创建 Collection i_name ...
阅读全文
ORACLE 8i中的JOIN
摘要:create table test1(a int,b int); create table test2(a int,b int); insert into test1 values(1,456); insert into test1 values(2,427); insert into...
阅读全文
ORACLE PL/SQL中的CASE
摘要:1.declare x number := 60; begin case x when 10 then dbms_output.put_line('x=10'); when 20 then dbms_output.put_line('x=20'); when 30 then dbms_output.put_line('x=30')...
阅读全文
Oracle PL/SQL中的IF
摘要:declare x number := 20; begin if x = 10 then dbms_output.put_line('x = 10'); elsif x = 20 then dbms_output.put_line('x = 20'); else dbms_output.put_line('no data'); end if; end;
阅读全文
oracle 正则表达式续
摘要:General Information Anchoring Charac...
阅读全文
Oracle 正则表达式
摘要:就是由普通字符(例如字符a到z)以及特殊字符(称为元字符)组成的文字模式。该模式描述在查找文字主体时待匹配的一个或多个字符串。正则表达式作为一个模板,将某个字符模式与所搜索的字符串进行匹配。 本文详细地列出了能在正则表达式中使用,以匹配文本的各种字符。当你需要解释一个现有的正则表达式时,可以作为一个快捷的参考。更多详细内容,请参考:Francois Liger,Craig McQueen,Pal ...
阅读全文
IN條件下的綁定變量做法
摘要:create or replace type myTableType as table of number; Type created. create or replace function str2tbl( p_str in varchar2 ) return myTableType as l_str long default p_str || ','; ...
阅读全文
pl/sql中TABLE()函數的用法(轉)
摘要:PL/SQL表---table()函数用法 /* PL/SQL表---table()函数用法: 利用table()函数,我们可以将PL/SQL返回的结果集代替table。 simple example: 1、table()结合数组: */ create or replace type t_test as object( id integer, rq date, mc varchar2(...
阅读全文
over函數的妙用
摘要:一个滚动算累计值得难题,谢谢 ID je(金额) rs(人数) 1 10 2 2 20 5 1 5 1 1 40 4 1 100 10 希望得到如下结果 即当type=2的时候 累计je=上次的je(10)+本次rs(5)*上次的 je(10)/rs(2)得5 也就是 10+5*(10/2) = 35 ID je rs 1 ...
阅读全文
浙公网安备 33010602011771号