SQLDeveloper中BLOB字段的使用
1、新建带BLOB字段的表so_odrfeedback_rd_tmp
2、插入BLOB数据
–插入空BLOB
INSERT INTO so_odrfeedback_rd_tmp (CRM_ORDER_ID,CUST_ORDER_ID,XML_DATA,BOOK_TIME,CREATE_TIME,REMARKS,STATUS,RET_CODE,RET_MSG,ORDER_SOURCE)values(‘L1619052800000164’,‘O1614052800000164’,empty_blob(),null,SYSDATE,‘err’,‘N’,‘999999’,‘错误!’,‘CRMA’)
–插入非空BLOB
INSERT INTO so_odrfeedback_rd_tmp (CRM_ORDER_ID,CUST_ORDER_ID,XML_DATA,BOOK_TIME,CREATE_TIME,REMARKS,STATUS,RET_CODE,RET_MSG,ORDER_SOURCE)values(‘L1614052800000165’,‘O1614052800000165’,utl_raw.cast_to_raw(‘some magic here’),null,SYSDATE,‘err’,‘N’,‘999999’,‘错误!’,‘CRMA’)
3、修改BLOB数据
update so_odrfeedback_rd_tmp set XML_DATA =rawtohex( ‘{
“ROOT”: {
“HEADER”: {
“ROUTING”: {
“ROUTE_KEY”: “”,
“ROUTE_VALUE”: “”
}
},
“BODY”: {
“BUSI_INFO”: {
“ID_NO”: “83141393751”,
“NET_TYPE”: “0”
}
}
}
}’) where CRM_ORDER_ID = ‘L1619052800000164’;
4、查看修改后的数据
select * from so_odrfeedback_rd_tmp where CRM_ORDER_ID = ‘L1619052800000164’;