ORACLEÓÅ»¯ Ö´Ðмƻ®
<!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;
mso-font-charset:2;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:0 268435456 0 0 -2147483648 0;}
@font-face
{font-family:ËÎÌå;
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-alt:SimSun;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 680460288 22 0 262145 0;}
@font-face
{font-family:"\@ËÎÌå";
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 680460288 22 0 262145 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0cm;
margin-bottom:.0001pt;
text-align:justify;
text-justify:inter-ideograph;
mso-pagination:none;
font-size:10.5pt;
mso-bidi-font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:ËÎÌå;
mso-font-kerning:1.0pt;}
/* Page Definitions */
@page
{mso-page-border-surround-header:no;
mso-page-border-surround-footer:no;}
@page Section1
{size:595.3pt 841.9pt;
margin:72.0pt 90.0pt 72.0pt 90.0pt;
mso-header-margin:42.55pt;
mso-footer-margin:49.6pt;
mso-paper-source:0;
layout-grid:15.6pt;}
div.Section1
{page:Section1;}
/* List Definitions */
@list l0
{mso-list-id:953098829;
mso-list-template-ids:979432118;}
@list l0:level1
{mso-level-number-format:bullet;
mso-level-text:;
mso-level-tab-stop:36.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;
mso-ansi-font-size:10.0pt;
font-family:Symbol;}
ol
{margin-bottom:0cm;}
ul
{margin-bottom:0cm;}
-->
ORACLEÖ´Ðмƻ®
Ò»£®Ïà¹ØµÄ¸ÅÄî
RowidµÄ¸ÅÄrowidÊÇÒ»¸öαÁУ¬¼ÈÈ»ÊÇαÁУ¬ÄÇôÕâ¸öÁоͲ»ÊÇÓû§¶¨Ò壬¶øÊÇϵͳ×Ô¼º¸ø¼ÓÉϵġ£¶Ôÿ¸ö±í¶¼ÓÐÒ»¸örowidµÄαÁУ¬µ«ÊÇ ±íÖв¢²»ÎïÀí´æ´¢ROWIDÁеÄÖµ¡£²»¹ýÄã¿ÉÒÔÏñʹÓÃÆäËüÁÐÄÇÑùʹÓÃËü£¬µ«ÊDz»ÄÜɾ³ý¸ÄÁУ¬Ò²²»ÄܶԸÃÁеÄÖµ½øÐ
Ïà¹ØÎĵµ£º
/*
--DML´¥·¢Æ÷ÀàÐÍ:
·ÖΪÓï¾ä¼¶´¥·¢Æ÷ºÍÐм¶´¥·¢Æ÷.
Óï¾ä¼¶´¥·¢Æ÷²»ÐèÒª¼Ófor each row¹Ø¼ü×Ö,²¢ÇÒ²»ÄÜʹÓÃ:new ºÍ :old¹Ø¼ü×Ö.¶ÔÕû¸ösqlÓï¾äÖ»Ö´ÐÐÒ»´Î´¥·¢Æ÷.
Ðм¶´¥·¢Æ÷ÐèÒª¼Ófor each row¹Ø¼ü×Ö,¿ÉÒÔʹÓÃ:newºÍ:old¹Ø¼ü×Ö,¶ÔÕû¸ösqlÓï¾äÓ°Ïìµ½µÄÿһÐж¼Ö´ÐÐÒ»´Î´¥·¢Æ÷.
--:newºÍ:old¹Ø¼ü×Ö×ܽá
:newÖ¸µÄÊǵ±Ç°D ......
oracle´æ´¢¹ý³ÌÒì³£ÐÅÏ¢µÄÏÔʾ
֮ǰд´æ´¢¹ý³Ìʱ£¬Òì³£´¦Àíд·¨ÊÇ£º
...
EXCEPTION
WHEN OTHERS THEN
ROLLBACK;
END ...
ÕâÖÖд·¨µ±´æ´¢¹ý³ÌÅ׳öÒ쳣ʱ£¬ÎÒÃDz»ÖªµÀÆäµ½µ×Å׳öÁËÄÄÖÖÒì³££¨±ÈÈçÁпí¶È²»¹»´ó¶øÔÚ²åÈëÊý¾ÝʱÅ×Òì³££©£¬¿ÉÒÔ°´ÈçÏ·½Ê½ÏÔʾÒì³£ÐÅÏ¢
EXCEPTION
  ......
·½·¨Ò»£º
SQL>create table aa(a number);
´´½¨³É¹¦¡£
SQL> select * from aa;
A
--------
2
SQL>
SQL> insert all
2 into aa values(1)
3 into aa values(2)
4 select * from dual;
ÒÑ´´½¨2ÐС£
SQL> commit;
Ìá½»Íê³É¡£
SQL> select * from aa;
A
----------
2
1
2
·½·¨¶þ£º
S ......
SQL> DESC TEST ²âÊÔ±í: Name Type Nullable Default Comments
---- ------------ ......
ÔÚÒ»¸ö±íÖУ¬ÆäÖм¸¸ö×ֶεÄÖµÊÇÒ»ÑùµÄ£¬°´ÕÕÕ⼸¸ö×ֶνøÐзÖ×é²¢ºÏ²¢Êý¾Ý¡£
±íA id name role
1 ÕÅÈý &nb ......