上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 19 下一页
  2012年5月5日
摘要: 参考网址:http://www.oracle-developer.net/content/utilities/replacef.sql A function to simplify string building and debugging by replacing multiple placeholders from a collection of inputs.定义集合的类型:1 CREATE OR REPLACE TYPE replacef_ntt AS TABLE OF VARCHAR2(4000);函数: 1 CREATE OR REPLACE FUNCTION replace... 阅读全文
posted @ 2012-05-05 10:09 Coldest Winter 阅读(259) 评论(0) 推荐(0) 编辑
  2012年5月4日
摘要: SESSION 阅读全文
posted @ 2012-05-04 07:59 Coldest Winter 阅读(1487) 评论(0) 推荐(0) 编辑
  2012年5月3日
摘要: 参考资料:http://www.oracle-developer.net/content/utilities/merge_counter.sql文档:Oracle Database SQL Reference, 10g Release 2 (10.2)---1235页Oracle MERGE INTO的用法总结: Use the MERGE statement to select rows from one or more sources for update orinsertion into a table or view. You can specify conditions to de. 阅读全文
posted @ 2012-05-03 22:09 Coldest Winter 阅读(1299) 评论(0) 推荐(0) 编辑
摘要: 1、使用SYS_GUID(),获取32位的UUID.1 SELECT SYS_GUID() FROM DUAL2、当要将某数据插入到A表中,但是在B表中也要使用插入数据的ID,就可以提前声明一个变量,存放它的ID,而不需要通过INSERT语句中使用RETURNING语句返回ID。1 DECLARE2 V_ID VARCHAR2(100) := SYS_GUID();3 BEGIN4 DBMS_OUTPUT.PUT_LINE(V_ID);5 END;3、其他使用的随机数是使用SYS.dbms_random包中提供的函数和过程: 1 --Obsolete(过时), get integer ... 阅读全文
posted @ 2012-05-03 20:27 Coldest Winter 阅读(2275) 评论(0) 推荐(0) 编辑
  2012年4月30日
摘要: http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:766825833740 阅读全文
posted @ 2012-04-30 12:14 Coldest Winter 阅读(161) 评论(0) 推荐(0) 编辑
  2012年4月27日
摘要: 参考网址:http://www.oracle-base.com/articles/misc/string-aggregation-techniques.php#listagghttp://docs.oracle.com/cd/B14117_01/appdev.101/b10800/dciaggref.htmhttp://www.cxy.me/BBS/view26-22712-1.htmhttp://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:2196162600402LISTAGG Analystic Function 阅读全文
posted @ 2012-04-27 22:09 Coldest Winter 阅读(488) 评论(0) 推荐(0) 编辑
摘要: http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:766825833740http://www.oracle-developer.net/display.php?id=506 阅读全文
posted @ 2012-04-27 07:00 Coldest Winter 阅读(283) 评论(0) 推荐(0) 编辑
摘要: “如果你可以使用一句SQL解决的需求,就使用一句SQL;如果不可以,就考虑PL/SQL是否可以;如果PL/SQL实现不了,就考虑Java存储过程是否可以;如果这些都不可能实现,那么就需要考虑你是否真的需要实现这个需求。”参考网址:http://www.oracle-base.com/articles/misc/string-aggregation-techniques.php#listagg http://www.oracle-base.com/articles/misc/lag-lead-analytic-functions.php http://space.itpub... 阅读全文
posted @ 2012-04-27 06:55 Coldest Winter 阅读(273) 评论(0) 推荐(0) 编辑
  2012年4月26日
摘要: 1、将字符串转换为日期:可以不用TO_DATE1 SELECT * FROM EMP E WHERE E.HIREDATE < DATE '2012-08-09'2、从子查询中删除数据1 DELETE FROM (SELECT * FROM DUAL)3、查询所有的系统默认参数1 SELECT * FROM NLS_DATABASE_PARAMETERS;2 SELECT * FROM NLS_SESSION_PARAMETERS;4、查询数据库的信息1 SELECT * FROM v$database;4、查询实例的相关信息:包括主机名,启动时间,当前的状态,版本信息1 阅读全文
posted @ 2012-04-26 07:37 Coldest Winter 阅读(477) 评论(0) 推荐(0) 编辑
  2012年4月22日
摘要: date 阅读全文
posted @ 2012-04-22 07:15 Coldest Winter 阅读(1185) 评论(0) 推荐(0) 编辑
上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 19 下一页