Oracle LOB×ֶβÙ×÷µÄÒ»µã½Ìѵ
½ñÌìÓиö¹¦ÄÜÐèÒª¶ÔCLOB×ֶνøÐвÙ×÷£¬ÆÚ¼äÓöµ½¼¸¸öÎÊÌ⣬ÀÏÌì¾ì¹Ë£¬¶¼ËãÊǽâ¾öÁË£¬¼Çһϣ¬ÃâµÃÈÕºóÖØµ¸¸²ÕÞ¡£
´íÎóÒ»£º
ORA-22920: Î´Ëø¶¨º¬ÓÐ LOB ÖµµÄÐÐ
³öÏÖÕâ¸öÎÊÌâµÄÔÒò£¬ÊÇÓÉÓÚselect³öLOB×Ö¶Îʱδ¼Ó for update£¬ORACLE¹Ù·½Îĵµ¶Ô¸Ã´íÎóµÄ˵Ã÷£º
ÒýÓÃÎÄ×Ö´úÂë
ORA-22920 row containing the LOB value is not locked
Cause: The row containing the LOB value must be locked before updating the LOB value.
Action: Lock the row containing the LOB value before updating the LOB value.
ORA-22920 row containing the LOB value is not locked
Cause: The row containing the LOB value must be locked before updating the LOB value.
Action: Lock the row containing the LOB value before updating the LOB value.
ÓÚÊǼÓÉÏfor updateÔٲ⣬·¢ÏÖ´íÎóÌáʾ±äÁË£¬±ä³ÉÏÂÃæµÄ£º
´íÎó¶þ£º
ORA-01002: ¶ÁȡΥ·´Ë³Ðò
³öÏÖÕâ¸öÎÊÌâµÄÔÒòÊÇConnection µÄ autoCommitÊôÐÔֵΪtrue£¬¸Ä³É
Sql´úÂë conn.setAutoCommit(false);
......
LOB²Ù×÷
.....
conn.commit();
conn.setAutoCommit(true);
conn.setAutoCommit(false);
......
LOB²Ù×÷
.....
conn.commit();
conn.setAutoCommit(true);
¾Í¿ÉÒÔÁË¡£
ÁíÍ⣬עÒâµÚÒ»²½µÄselectʱ£¬²»Òªselect³ö·ÇLOBµÄ×ֶΣ¬²¢ÇÒ£¬Èç¹ûÒ»ÕűíÓжà¸öLOB×ֶΣ¬²Ù×÷˳ÐòÒ²×îºÃ°´ÕÕ±íÀïµÄ×Ö¶Î˳ÐòÀ´²Ù×÷£¬·ñÔòÒ²¿ÉÄܳö´í¡£
Ïà¹ØÎĵµ£º
ËäȻѧϰJavaºÜ¾ÃÁË£¬×Ô¼ºÒ²Á¬½Ó¹ýһЩÊý¾Ý¿â£¬±ÈÈçmysqlÖ®ÀàµÄ£¬Èç½ñÄØ£¬Ò²Ñ§Ï°ÁËÒ»¶Îʱ¼äµÄOracle£¬È»¶øÄØ£¬½ñÌìÊÇÎÒµÚÒ»´ÎÁ¬½ÓOracle£¬ºÙºÙ£¬Ó¦¸Ã»¹²»ËãÌ«³Ù°É¡£
½ñÌìÄØ£¬Óе㱿׾£¬´ó¼ÒĪЦ£¡
ÎÒÕâÊÇÒ»¸ö²éѯÀý×Ó
Ê×ÏÈ£¬Ô ......
Ê×ÏȼÆËã»úÉϱØÐë°²×°oracle£¬²¢ÅäÖú÷þÎñÃû
°²×°oracleµÄ¹ý³ÌÖÐÒ»°ã»áÒªÇó½¨Á¢Ò»¸öÊý¾Ý¿â£¬Ò²¿ÉÒÔÖ®ºóÔÙ´´½¨
Õâ¸öºóÃæÓÐÒ»¸ö Êý¾Ý¿âÅäÖÃÖúÀí £¨´´½¨ÐÞ¸ÄÊý¾Ý¿âµÄ£¬Ò»°ãÃÜÂë´´½¨ÒªÇó×Öĸ¿ªÍ·£¬´óÓÚ7λɶµÄ£©ºÍÒ»¸önetÅäÖÃÖúÀí£¨Ìí¼Ó»òÕßÐÞ¸ÄÒ»¸öÊý¾Ý¿â·þÎñÃû£©£¬Ò»°ãÓÃplsql developerÔ¶³Ì²Ù×÷oracleÊý¾Ý¿â ......
ÎÒÃÇÏÈÀ´¿´Ò»ÏÂËûÃǵ͍Ò壺
A schema is a collection of database objects (used by a user.).
Schema objects are the logical structures that directly refer to the database’s data.
A user is a name defined in the database that can connect to and access objects.
Schemas and users help database ......
1. ´´½¨ Sequence
ʹÓÃÈçÏÂÃüÁîн¨sequence(Óû§ÐèÒªÓÐCREATE SEQUENCE »òÕßCREATE ANY SEQUENCEȨÏÞ):
CREATE SEQUENCE test_sequence
INCREMENT BY 1 -- ÿ´Î¼ÓµÄ¸öÊý¾Ý
START WITH 1 -- ´Ó1¿ªÊ¼¼ÆÊý
NOMAXVALUE& ......
參¿¼:http://blog.csdn.net/rainnyzhong/archive/2009/01/09/3740660.aspx
×÷ÕߣºRainny
ÈÕÆÚ£º2009-1-8
´´½¨²âÊÔ±í£º
create table test(c_id varchar2(20));
²åÈë²âÊÔÊý¾Ý£º
insert into test values ('1234');
insert into test values ('45678');
insert into test values ('-12 ......