oracle blob 非空,ORA-00908:Oracle SQL中缺少NULL关键字(blob数据类型)

您似乎在其版本不支持您正在执行的操作的数据库中。例如11gR2:

SQL> select * from v$version;

BANNER

--------------------------------------------------------------------------------

Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

PL/SQL Release 11.2.0.4.0 - Production

CORE 11.2.0.4.0 Production

TNS for Linux: Version 11.2.0.4.0 - Production

NLSRTL Version 11.2.0.4.0 - Production

SQL> CREATE TABLE test

2 (

3 log_id NUMBER (19, 0) CONSTRAINT pk_lid PRIMARY KEY,

4 data_before BLOB,

5 data_after BLOB,

6 constraint data_before_json CHECK (data_before IS json),

7 constraint data_after_json check (data_after is json)

8 )

9 lob (data_before) store as(storage (next 15m)),

10 lob (data_after) store as(storage (next 15m));

constraint data_before_json CHECK (data_before IS json),

*

ERROR at line 6:

ORA-00908: missing NULL keyword

在12.2:

BANNER CON_ID

-------------------------------------------------------------------------------- ----------

Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production 0

PL/SQL Release 12.2.0.1.0 - Production 0

CORE 12.2.0.1.0 Production 0

TNS for Linux: Version 12.2.0.1.0 - Production 0

NLSRTL Version 12.2.0.1.0 - Production 0

SQL> CREATE TABLE test

2 (

3 log_id NUMBER (19, 0) CONSTRAINT pk_lid PRIMARY KEY,

4 data_before BLOB,

5 data_after BLOB,

6 constraint data_before_json CHECK (data_before IS json),

7 constraint data_after_json check (data_after is json)

8 )

9 lob (data_before) store as(storage (next 15m)),

10 lob (data_after) store as(storage (next 15m));

Table created.

SQL>

请注意您和我的代码之间的区别。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值