gpt4 book ai didi

sql - Oracle 错误 ORA-00971

转载 作者:搜寻专家 更新时间:2023-10-30 21:44:43 25 4
gpt4 key购买 nike

针对 Oracle 10g (10.2.0.1.0) 运行以下 SQL 时出现错误:

UPDATE fx_datumvcompgeneric AS c
SET mp = (SELECT p.mp
FROM fx_propertyattrsingletscomp AS p
WHERE c.var_container = p.id
)
WHERE c.mp IS NULL

错误是:ORA-00971:缺少 SET 关键字

我们通过 JDBC 来做这件事,异常堆栈的顶部是:

java.sql.SQLException: ORA-00971: missing SET keyword

oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:745)
oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:207)
oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:957)
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1170)
oracle.jdbc.driver.OracleStatement.executeUpdateInternal(OracleStatement.java:1623)
oracle.jdbc.driver.OracleStatement.executeUpdate(OracleStatement.java:1588)
org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:225)
org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:225)

最佳答案

摆脱这两个 AS 关键字 - Oracle 不喜欢它们。

关于sql - Oracle 错误 ORA-00971,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7793457/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com