我正在oracle 11g中设计一个数据库 . 我设计了一个带有田地的 table ,
CUST_ID, NUMBER(5) //this is a foreign key
Review, BLOB //to store big strings
Date, SYSDATE
现在,当我试图在表格中插入数据时 -
insert into "ReviewTable" values ( 3, 'hello, this is the first review',SYSDATE)
它给[Err] ORA-01465:无效的十六进制数 . 如果有人可以帮我解决错误?
1 回答
你把你的字符串转换成BLOB,你可以通过包
utl_raw.cast_to_raw
或通过to_clob('mystring')
将varchar转换为clob然后在你的代码中使用过程DBMS_LOB.convertToBlob
但是如果你打算将字段用于字符串,为什么不把它们保存为CLOB呢?
以下是BLOB和CLOB字段的2个示例
BLOB
CLOB