ORACLE ÈçºÎ²úÉúÒ»¸öËæ»úÊý
ORACLE ÈçºÎ²úÉúÒ»¸öËæ»úÊý:DBMS_RANDOM
--1¡¢Ð¡Êý( 0 ~ 1)
select dbms_random.value from dual ;
--2¡¢Ö¸¶¨·¶Î§ÄÚµÄСÊý ( 0 ~ 100 )
select dbms_random.value(0,100) from dual ;
--3¡¢Ö¸¶¨·¶Î§ÄÚµÄÕûÊý ( 0 ~ 100 )
select trunc(dbms_random.value(0,100)) from dual ;
--4¡¢³¤¶ÈΪ20µÄËæ»úÊý×Ö´®
select substr(cast(dbms_random.value as varchar2(38)),0,10) from dual ;
--5¡¢Õý̬·Ö²¼µÄËæ»úÊý
select dbms_random.normal from dual ;
--6¡¢Ëæ»ú×Ö·û´®
select dbms_random.string('x', 3) from dual ;
/* opt¿ÉȡֵÈçÏ£º
'u','U' : ´óд×Öĸ
'l','L' : Сд×Öĸ
'a','A' : ´ó¡¢Ð¡Ð´×Öĸ
'x','X' : Êý×Ö¡¢´óд×Öĸ
'p','P' : ¿É´òÓ¡×Ö·û*/
--7¡¢Ëæ»úÈÕÆÚ
select to_date(2454084+TRUNC(DBMS_RANDOM.VALUE(0,365)),'J') from dual ;
/* ͨ¹ýÏÂÃæµÄÓï¾ä»ñµÃÖ¸¶¨ÈÕÆÚµÄ»ùÊý*/
select to_char(sysdate,'J') from dual ;
--8¡¢Éú³ÉGUID
select sys_guid() from dual ;
--Éú³É´ø·Ö¸ô·û(-)µÄGUIDµÄ×Ô¶¨Ò庯Êý
--create or replace function my_guid
return varchar2
is
guid varchar(36);
temp varchar(32);
begin
temp:=sys_guid();
guid:= substr(temp,1,8) || '-'
||substr(temp,9,4) || '-'
||substr(temp,13,4)|| '-'
||substr(temp,17,4)|| '-'
||substr(temp,21,12)
Ïà¹ØÎĵµ£º
An introduction to Mutexes in 10gR2
By Connie Green, Kumar Rajamani
from meetings with: Kumar Rajamani, Russell Green, Saureen Shah, Cecilia Gervasio and Connie Green
Introduction
This paper is intended as an introduction to mutexes. It describes new concepts associated with mutexes, when ......
±¸·ÝµÄ·½·¨
ORACLEÊý¾Ý¿âÓÐÈýÖÖ±ê×¼µÄ±¸·Ý¡£µ¼³ö/µ¼Èë(EXPORT/IMPORT) ¡¢À䱸·Ý¡¢Èȱ¸·Ý¡£
µ¼³ö±¸·ÝÊÇÒ»ÖÖÂß¼±¸·Ý£¬ÕâÖÖ·½·¨°üÀ¨¶ÁȡһϵÁеÄÊý¾Ý¿âÈÕÖ¾£¬²¢Ð´ÈëÎļþÖУ¬ÕâЩÈÕÖ¾µÄ¶ÁÈ¡ÓëÆäËù´¦Î»ÖÃÎ޹ء£
À䱸·ÝºÍÈȱ¸·ÝÊÇÎïÀí±¸·Ý(Ò²³ÆµÍ¼¶±¸·Ý)£¬ËüÉæ¼°µ½ ......
ORACLE ÖÐSQL Óï¾ä´óÖ¿ÉÒÔ·ÖΪ4´óÀà
1.DQL£¨data quary language Êý¾Ý²éѯÓïÑÔ£©
Êý¾Ý²éѯÓïÑÔDQL»ù±¾½á¹¹ÊÇÓÉSELECT×Ӿ䣬from×Ӿ䣬WHERE×Ó¾ä×é³É
2.DDL£¨data definition language Êý¾Ý¶¨ÒåÓïÑÔ£©
CREATE
ALTER
DROP
RENAME
TRUNCATE
3.DML£¨data manipulation language Êý¾Ý²Ù×ÝÓïÑÔ£©
INSERT
UPDATE
......
Oracle
ÖеÄÈÕÆÚÀàÐͼ°ÆäÏà¹ØµÄº¯Êý
Oracle
ÌṩÁ˺ܶàµÄÄÚÖõÄÈÕÆÚÀàÐÍ£¬°üÀ¨Èçϼ¸ÖÖ£º
Date
Timestamp
Timestamp With Time Zone
Timestamp With Local Time Zone
Interval Year To Month
Interval Day To Second
DateÀàÐÍÓÃÓÚ´æ´¢ÈÕÆÚ£¬¾«È·µ½Ã룬¿ÉÄÜͨ¹ýÉèÖÃNLS_DATE_FORMAT»òÕßTO_CHAR·½·¨À´¸ñʽ»¯ÈÕÆÚµÄÊ ......
oracleÊý¾Ý¿âµÄµ¼ÈëÓëµ¼³öÊÇ×öΪһÃûʵʩ¹¤³Ìʦ»òά»¤¹¤³Ìʦÿ¾³£Òª×öµÄ¹¤×÷¡£µ±Êý¾Ý¿â½á¹¹ÐèÒª×ö±ä»¯µÄʱºò£¬ÎÒÃÇÒ»°ãÏȽ«Êý¾Ý×ö±¸·Ý£¬´ËʱÎÒÃÇÐèҪʹÓõ½OracleµÄµ¼³ö¹¦ÄÜ¡£µ±ÎÒÃÇÔÚ×öµ¼ÈëµÄʱºò³ö´í»òÕßÎÒÃǵÄÊý¾ÝÔâµ½´íÎóɾ³ýµÄʱºò£¬ÎÒÃÇÐèÒª»Ö¸´Êý¾Ý¿â£¬ÄÇÎÒÃÇÐèҪʹÓõ½µ¼ÈëµÄ¹¦ÄÜ¡£ÏÖÔÚÒ²Óкܶ๦ÄÜÄܹ»°ïÎÒÃÇ×öµ½ ......