Oracle笔记-使用sql命令插入clob数据(大于4000,适用于18c)

如下SQL语句:

Insert into XXXX.XXXX (UPDATE_TIME,FILE_NAME,FILE_TYPE,CONTENT) values (to_timestamp('22-10月-20 02.30.45.000000000 下午','DD-MON-RR HH.MI.SSXFF AM'),'CCCCC_2020-10-16.RB','test5', TO_CLOB(q'[]')||TO_CLOB(q'[]')||TO_CLOB(q'[]')||TO_CLOB(q'[]'));

在q'[]’中填写小于4000个字符的值,如果有9000个,就分成三段,如:

Insert into XXXX.XXXX (UPDATE_TIME,FILE_NAME,FILE_TYPE,CONTENT) values (to_timestamp('22-10月-20 02.30.45.000000000 下午','DD-MON-RR HH.MI.SSXFF AM'),'CCCCC_2020-10-16.RB','test5', TO_CLOB(q'[AAAAAAAAAAAAAAAAAAAAA]')||TO_CLOB(q'[BBBBBBBBBBBBBBBBB]')||TO_CLOB(q'[CCCCCCCCCCCCCCCCCCC]')||TO_CLOB(q'[DDDDDDDDDDDDDDDDDD]'));

 

©️2020 CSDN 皮肤主题: 数字20 设计师:CSDN官方博客 返回首页