考虑到这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