如何从sqldeveloper中的插入语句插入BLOB列? [英] How can I insert into a BLOB column from an insert statement in sqldeveloper?

查看:90
本文介绍了如何从sqldeveloper中的插入语句插入BLOB列?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以使用sqldeveloper插入oracle中的BLOB列?

Is it possible to insert into a BLOB column in oracle using sqldeveloper?

即像这样:

insert into mytable(id, myblob) values (1,'some magic here');

推荐答案

是的,例如使用从RAW到BLOB的隐式转换:

Yes, it's possible, e.g. using the implicit conversion from RAW to BLOB:

insert into blob_fun values(1, hextoraw('453d7a34'));

453d7a34是十六进制值的字符串,首先将其明确转换为RAW数据类型,然后插入到BLOB列中.结果是BLOB值为4个字节.

453d7a34 is a string of hexadecimal values, which is first explicitly converted to the RAW data type and then inserted into the BLOB column. The result is a BLOB value of 4 bytes.

这篇关于如何从sqldeveloper中的插入语句插入BLOB列?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆