简体   繁体   English

SQL中的varbinary(max)错误

[英]varbinary(max) error in SQL

I want to use a column that contains images in it. 我想使用其中包含图像的列。 I've tried this code 我已经试过这段代码

create table books
(
   book_id number(4),
   title varchar2 (50),
   ISBN varchar2(20), 
   author varchar2(40),
   publisher varchar2(20),
   released number(4),
   image varbinary(max),
   constraint booksPK primary key (book_id),
   constraint booksFK foreign key (subject_id) references subject(subject_id)
);

and I got this error: 我得到这个错误:

Error at Command Line:29 Column:16 错误在命令行:29列:16
Error report: 错误报告:
SQL Error: ORA-00907: missing right parenthesis SQL错误:ORA-00907:缺少右括号
00907. 00000 - "missing right parenthesis" 00907. 00000-“缺少右括号”
*Cause: *原因:
*Action: *行动:

please help me with this... 请在这件事上给予我帮助...

varbinary isn't an Oracle data type. varbinary不是Oracle数据类型。 You should be using a binary large object (BLOB) . 您应该使用二进制大对象(BLOB) A comment suggested long raw , but BLOBs have fewer restrictions and should be used instead . 注释建议使用long raw ,但BLOB 的限制较少,应改用 BLOB。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM