考虑到这TEST_SCRIPT
就是CLOB
为什么当我在Oracle上从SQL * PLUS运行此简单查询时出现错误的原因:
ORA-00932: inconsistent datatypes: expected - got CLOB
我一直在阅读很多有关同一错误的问题,但这些问题都没有从SQLPLUS运行直接查询
UPDATE IMS_TEST
SET TEST_Category = 'just testing'
WHERE TEST_SCRIPT = 'something'
AND ID = '10000239'
完整示例:
SQL> create table ims_test(
2 test_category varchar2(30),
3 test_script clob,
4 id varchar2(30)
5 );
Table created.
SQL> insert into ims_test values ('test1','something','10000239');
1 row created.
SQL> UPDATE IMS_TEST
2 SET TEST_Category = 'just testing'
3 WHERE TEST_SCRIPT = 'something'
4 AND ID = '10000239';
WHERE TEST_SCRIPT = 'something'
*
ERROR at line 3:
ORA-00932: inconsistent datatypes: expected - got CLOB
'something'
实际上是否超过4000个字符?