◎筱米加步枪◎.Blog

Happy coding

有关Oracle中的Blob字段更新问题

筱米加步枪 posted @ 2011年2月10日 03:54 in [ 数据库 ] with tags Oracle Blob 更新 , 4814 阅读

先说下偶遇到的问题:

Oracle中我使用Blob字段来存一个Xml内容.新增一条记录正常,但是尝试用一条记录去更新已经存在的记录.

发现Blob中的字段中的内容并没有被更新掉.


网络上的一些朋友说原因如下:

假设Blob字段中已经存在的内容是100个字节,那么尝试用50字节的内容去更新,

那么得到的结果就是:前面50个字节被覆盖,而Blob仍然存在100个字节,其中后面50个字节是原先的后50个字节.


那么解决的方法如下:(证实可以通过)

先清空原Blob字段中的数据,再进行字节的写入.(与平常的更新操作会多了一步).

具体的更新方法如下:

UPDATE 表名 SET BLOB字段=EMPTY_BLOB() WHERE 条件.

然后再执行具体的更新SQL语句.

KVS UKG Model Paper 说:
2022年9月29日 01:52

The Kendriya Vidyalaya Sangathan has more than 1235 schools at all states and Union Territory of the Country, KVS UKG Model Paper and the regional teaching staff has designed and provided the KVS UKG Model Paper 2023 for all eligible Upper Kindergarten students for every evaluation to guessing exam pattern with practice subject wise question.The Kendriya Vidyalaya Sangathan has more than 1235 schools at all states and Union Territory of the Country.

Meghalaya 7th Class 说:
2023年7月19日 02:50

Students Should Download the Respective Stream wise MBOSE Board 7th Class Exam Syllabus Subjects of Hindi, English, Mathematics, Science, Social Science etc, Pdf Format Provide Check the same From our page here,Students need to Start Their Preparation by first Downloading the Stream wise MBOSE 7th Class Curriculum Syllabus 2024 Latest Edition.Meghalaya Board Class Syllabus 2024 is Designed in Meghalaya 7th Class Syllabus 2024 Accordance with the NCERT Based Guidelines and helps Students to get an Overview of the Hindi, English Medium All Subject, MBOSE keeps a Class Exam Pattern with the aim to Provide a Quality Education for All Students, On the basis of the Current Educational Demands


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter