java.sql.SQLException : ORA-00933: SQL command not properly ended in selecty statement

标签 java servlets jdbc

我在 servlet 中将查询编写为......

"select Order_No from " + yard + "where Id= '" + idd + "'";

其中yard是表名的变量,idd是Id的变量,但我仍然收到错误,所以请告诉我我的错误并为我编写正确的查询示例...

最佳答案

表名后不能有空格

"select Order_No from " + yard + " where Id= '" + idd + "'";

关于java.sql.SQLException : ORA-00933: SQL command not properly ended in selecty statement,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16706604/

相关文章:

Java Servlet - 让 hello world 出现在按下按钮时

java - 嵌入 jetty : JSP and Servlets together?

java - 防止并发访问 servlet 中的方法

java - 在二进制数据库列中存储 Java UUID,Hibernate/JPA 与原始 JDBC

java - Slackware 12 真的很慢 JDBC

java - Eclipse 的资源包编辑插件?

java - 使用类的注释构建 TypeDescriptor

java - Apache Camel - 使用 jdbcMessageIdRepository 实现的幂等消费者模式是线程安全的吗?

java - Flyway 没有选择我的 sql 文件进行迁移

java - 需要帮助了解 Android 中处理异常的位置