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) 编辑