javaee中数据库异常

2023-06-27 16:42:10 浏览数 (1)

java.sql.SQLException: ORA-00928: 缺失 SELECT 关键字

at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.

 at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.

 at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.

 at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.

 at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.

 at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.

 at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.

 at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.

 at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.

 at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.

 at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.

 at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.

结决方案:

sql语句中应该是values把

java.sql.SQLException: ORA-00947: 没有足够的值

 at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.

 at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.

 at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.

 at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.

 at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.

 at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.

 at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.

 at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.

 at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.

 at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.

 at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.

 at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.

解决方案:删除表的列

0 人点赞