oracleÖÐrowidÊÇʲôÒâ˼
rowidÊÇoracleÊý¾Ý¿âÖÐΨһ±êʶÐеıêʶ·û£¬ÓÉÎļþºÅ¡¢ÇøºÅ¡¢¿éºÅºÍ²ÛºÅ×é³É¡£ËüÓÃÓÚÈ·±£Êý¾ÝÍêÕûÐÔ¡¢Ìá¸ßÅÌÎÊÐÔÄÜ£¬²¢ÔÚ¸´Öƺͻָ´²Ù×÷ÖÐÊ©Õ¹×÷Ó᣿ÉÒÔͨ¹ýselect rowidÓï¾ä»ñÈ¡rowid£¬²¢ÔÚ¸üС¢É¾³ý¡¢½¨ÉèË÷Òý»ò¸´Öƻָ´Ê±Ê¹ÓÃËü¡£×¢ÖØrowidÔÚ±íÖÐΨһ£¬µ«ÔÚ²î±ð±íÖпÉÄÜÏàͬ£¬²¢ÇÒÔÚ±í½á¹¹¸ü¸Äʱ¿ÉÄÜ»á¸ü¸Ä¡£
OracleÖеÄROWID
ʲôÊÇROWID£¿
ROWID£¨Ðбêʶ·û£©ÊÇOracleÊý¾Ý¿âÖÐÿ¸öÐеÄÒ»´®Î¨Ò»±êʶ·û¡£ËüÓÃÓÚ±êʶÐÐÔÚÊý¾Ý¿â±íÖеÄÎïÀíλÖá£
ROWIDµÄ×é³É
ROWIDÓÉÒÔϲ¿·Ö×é³É£º
ÎļþºÅ£º±êʶÊý¾Ý¿éËùÔÚµÄÊý¾ÝÎļþ¡£
ÇøºÅ£ºÈ·¶¨Ãü¾Ý¿éÔÚÊý¾ÝÎļþÖеÄλÖá£
¿éºÅ£º±êʶÐÐËùÔڵĿ顣
²ÛºÅ£º¶¨Î»ÐÐÔÚ¿éÖмòÖ±ÇÐλÖá£
ROWIDµÄÓÃ;
ROWIDÖ÷ÒªÓÃÓÚÒÔÏÂÄ¿µÄ£º
È·±£Êý¾ÝÍêÕûÐÔ£ºROWID²»»áÒò±íÖеÄÐÐÖØÐÂÅÅÐò»òɾ³ý¶ø¸ü¸Ä¡£ÕâÓÐÖúÓÚ±ÜÃâ²¢·¢»á¼ûºÍÊÂÎñÒì³£µ¼ÖÂÊý¾ÝË𻵡£
Ìá¸ßÅÌÎÊÐÔÄÜ£ºÍ¨¹ýʹÓÃROWID£¬Oracle¿ÉÒÔ¿ìËÙ¶¨Î»ÐУ¬ÎÞÐèɨÃèÕû¸ö±í¡£
¸´Öƺͻָ´²Ù×÷£ºROWIDÔÚ¸´Öƺͻָ´²Ù×÷ÖкÜÊÇÖ÷Òª£¬ÓÉÓÚËüÔÊÐí¶à°æ±¾¿ØÖƺÍÒ»ÖÂÐÔ¡£
»ñÈ¡ROWID
¿ÉÒÔʹÓÃÒÔÏÂÒªÁì»ñÈ¡ÐеÄROWID£º
SELECT ROWID FROM table_name WHERE ...;
µÇ¼ºó¸´ÖÆ
ʹÓÃROWID
ROWID¿ÉÒÔÔÚÒÔÏÂÇéÐÎÏÂʹÓãº
¸üлòɾ³ýÌض¨ÐУº
UPDATE table_name SET ... WHERE ROWID = ...; DELETE FROM table_name WHERE ROWID = ...;
µÇ¼ºó¸´ÖÆ
½¨ÉèË÷Òý£º
CREATE INDEX ON table_name (ROWID);
µÇ¼ºó¸´ÖÆ
¸´Öƺͻָ´²Ù×÷£º
ROWIDÔÚ¸´Öƺͻָ´²Ù×÷ÖÐÓÃÓÚ±êʶºÍ¶¨Î»ÐС£
×¢ÖØÊÂÏî
ROWIDÔÚ±íÖÐÊÇΨһµÄ£¬¿ÉÊÇÔÚ²î±ð±íÖпÉÄÜÏàͬ¡£
ROWID¿ÉÄÜ»áÔÚ±í½á¹¹±¬·¢¸ü¸Äʱ¸ü¸Ä£¬ÀýÈçÌí¼Ó»òɾ³ýÁС£
ÒÔÉϾÍÊÇoracleÖÐrowidÊÇʲôÒâ˼µÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡