oraclereturninginto

2015-07-24 10:40:42 ¡¤ ×÷Õß: ¡¤ ä¯ÀÀ: 3

returning into Óï¾äÓÃÓÚÖ´ÐÐÍêÓï¾äºó·µ»ØµÄÖµ£¬¾ßÌå·µ»ØÖ´ÐÐ֮ǰ»òÕßÖ®ºóµÄ½á¹û£¬ÈçÏÂËùÊö£º

deleteÓï¾äµÄreturning intoÓï¾ä·µ»ØµÄÊÇdelete֮ǰµÄ½á¹û£»
insertÓï¾äµÄreturning intoÓï¾ä·µ»ØµÄÊÇinsertÖ®ºóµÄ½á¹û¡£
updateÓï¾äµÄreturning intoÓï¾ä·µ»ØµÄÊÇupdateÖ®ºóµÄ½á¹û¡£
returning into Óï¾äÓëreturnͨÓÃ
insert into valuesÓï¾äÖ§³ÖreturningÓï¾ä£¬insert into selectÓï¾ä²»Ö§³Ö¡£
mergeÓï¾ä²»Ö§³ÖreturningÓï¾ä¡£

Àý£ºÈçϵÄÓï¾ä¶¼ÔÚ´æ´¢ÖУ¬v_ageΪÉùÃ÷µÄÒ»¸ö±äÁ¿

insert into t_test values (1, 'zhangsan','27') returning age into v_age;

update t_test set age = '28' returning age into v_age;

delete t_test returning age into v_age;