【发布时间】:2011-06-28 05:57:43
【问题描述】:
我在我的 ORACLE(10g) 数据库中使用以下查询。
SELECT * from student_table where student_no like '%STUDENT%' 相交 SELECT * from student_table where student_no in ('STUDENT1234','STUDENT5678')
我收到如下错误: java.sql.SQLSyntaxErrorException: ORA-00932: 不一致的数据类型:预期 - 得到 CLOB
知道如何解决这个错误吗?
【问题讨论】:
-
你知道,尽管有错误,这两者的交集只是第二个查询的结果,不是吗?至少我是这么认为的。我可能是错的,这不是第一次 :-)
-
@paxdiablo:你是对的。如果比较或字符串不同,则可以在 where 子句中使用“AND”而不是 INTERSECT。
标签: select oracle10g intersection ora-00932