¹ØÓÚoracleËæ»ú
17:00:59 SQL> desc dbms_random;
Element Type
---------- ---------
SEED PROCEDURE
VALUE FUNCTION
NORMAL FUNCTION
STRING FUNCTION
INITIALIZE PROCEDURE
RANDOM FUNCTION
TERMINATE PROCEDURE
NUM_ARRAY TYPE
ʹÓÃdescÃüÁî²é¿´¸Ã¹ý³ÌµÄ½á¹¹£¬ÆäÖÐÎÒÃÇÐèÒªÓõ½µÄÒ²¾Ívalues ¡¢normal¡¢string¡¢randomÕâËĸöº¯Êý°É£¬ÕâËĸöº¯Êý¶¼¾ßÓÐÈ¡Ëæ»úÖµµÄ¹¦ÄÜ£¬¾ßÌåÄؾͲ»Ì«Ò»ÑùÁË¡£
ÇÒ¿´£º
17:01:06 SQL> select dbms_random.value() from dual;
DBMS_RANDOM.VALUE()
-------------------
0.0536824248407651
17:05:09 SQL> select dbms_random.value(10,100) from dual;
DBMS_RANDOM.VALUE(10,100)
-------------------------
29.2420951206225
17:05:27 SQL> select dbms_random.value(-1,-4) from dual;
DBMS_RANDOM.VALUE(-1,-4)
------------------------
-3.98278017569502
²ÎÕÕoracle¹Ù·½Îĵµ½âÊÍÄØ£¬valueº¯ÊýÓÃÓÚ·µ»ØÁ½¸öÊýÖµÖ®¼äµÄËæ»úÊý£¬value£¨low£¬high£©£¬Èç¹ûÄãÏëµÃµ½µÄÊýÖµ½á¹û½éÓÚÁ½¸öÊýÖ®¼äÄØ£¬¾ÍÓÃvalueÁË¡£
17:05:37 SQL> select dbms_random.normal() from dual;
DBMS_RANDOM.NORMAL()
--------------------
1.09252306706526
17:08:10 SQL> select dbms_random.normal() from dual;
DBMS_RANDOM.NORMAL()
--------------------
-0.279331762111692
ÖÁÓÚnormalº¯ÊýÄØ£¬ÄǾÍÊÇÕæÕýµÄËæ»úÊýÀ²£¬³öÀ´µÄ½á¹ûÄؿ϶¨²»»áÈÃÄã²Âµ½À£¨Èç¹ûÄã²Â¶ÔÁË£¬¹§Ï²Ä㣬Äã¿ÉÒÔÈ¥Âò²ÊƱÀ²£¡£©
ÔÙ¿´randomº¯Êý
17:08:12 SQL> select dbms_random.random() from dual;
DBMS_RANDOM.RANDOM()
--------------------
1936087379
17:10:30 SQL> select dbms_random.random() from dual;
DBMS_RANDOM.RANDOM()
--------------------
-972915078
²é¿´¹Ù·½ÎĵµËµµÄÊÇrandomº¯Êý·µ»ØµÄÖµ½éÓÚ2µÄ31´Î·½ºÍ-2µÄ31´Î·½Ö®¼ä
Ïà¹ØÎĵµ£º
×Ô¼º¸Õ¿ªÊ¼ÓÃPL/SQLÀ´Ð´Ò»µã¶«Î÷£¬ÏÖÔÚ»¹·ôdzµÄºÜ£¬ËµÕâЩ²»ÊÇÏëÇ«Ð飬¶øÊÇÏëÈç¹ûÓиßÊÖ¿´µ½×Ô¼ºÓÐʲôµØ·½Ð´´íµÄ£¬Ï£Íû¸øÎÒÒ»µãÖ¸µã¡£
½ñÌìÏÂÎçÕÒÁËÒ»ÏÂÎç×Ô¼ºµÄÄǸöPL/SQL°üµÄ´íÎó£¬×îºó»¹Êǽâ¾öÁË¡£¡£¡£Á½¸öСµÄ²»ÄÜÔÙСµÄÎÊÌ⣬ºÍ´ó¼Ò·ÖÏíһϡ£
1¡¢ÔÚPL/SQLÖÐÈç¹ûÊǺ¯Êý£¬¾Í¿ÉÒÔSQLÓï¾äÖÐʹÓã¬Ò²¿ÉÒÔÔÚÆäËûµÄPL/SQL ......
´ÓÉÏÖÜ¿ªÊ¼£¬ÎÒÏÂÔØÁËС²¼ÀÏʦµÄ½²¿ÎÊÓƵ£¬¿ªÊ¼ÁËѧϰORACLEµÄ¼Æ»®¡£
ѧϰORACLEµÄÄ¿µÄ£¬Ò»·½ÃæÊÇÌá¸ß×Ô¼ºµÄ¼¼ÊõÄÜÁ¦£¬¹¤×÷ÉϾ³£¿ÉÒÔÓõõ½£¨ËäÈ»²»ÊÇרÃÅDBAµÄ¹¤×÷£¬µ«ÊǾ³£ÐèҪʹÓÃÊý¾Ý¿â×÷Ϊ±¨±íͳ¼Æ·ÖÎöµÄ¹¤¾ß£©£»ÁíÒ»·½Ã棬ҲÊÇΪÌø²Û×öºÃ¼¼ÊõÄÜÁ¦µÄ´¢±¸£¬ÏÖÔڵŤ×÷ÒѾ¿ìÈ ......
Basic Steps for Manual Online Reorganization Commands and procedures used:
1.DBMS_REDEFINITION.CAN_REDEF_TABLE
2.CREATE TABLE …
3.DBMS_REDEFINITION.START_REDEF_TABLE
4.DBMS_REDEFINITION.COPY_TABLE_DEPENDENTS and DBMS_REDEFINITION.CONS_ORIG_PAGRAMS
SELECT object_name,base_table_name, ......
ORACLE SQLÐÔÄÜÓÅ»¯´ó×ܽá
1£© Ñ¡Ôñ×îÓÐЧÂʵıíÃû˳Ðò(Ö»ÔÚ»ùÓÚ¹æÔòµÄÓÅ»¯Æ÷ÖÐÓÐЧ)£º
" ?; J) n+ v8 J- v" q OracleµÄ½âÎöÆ÷°´ÕÕ´ÓÓÒµ½×óµÄ˳Ðò´¦Àífrom×Ó¾äÖеıíÃû£¬from×Ó¾äÖÐдÔÚ×îºóµÄ±í(»ù´¡±í driving table)½«±»×îÏÈ´¦Àí£¬ÔÚfrom×Ó¾äÖаüº¬¶à¸ö±íµÄÇé¿öÏÂ,Äã±ØÐëÑ¡Ôñ¼Ç¼ÌõÊý×îÉٵıí×÷Ϊ»ù´¡±í¡ ......