即使存在该列,为什么也有ORA-00904? [英] Why do I have ORA-00904 even when the column is present?

查看:100
本文介绍了即使存在该列,为什么也有ORA-00904?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

执行休眠sql查询时看到错误.

I see an error while executing hibernate sql query.

java.sql.SQLException:ORA-00904:表名称".列名称":无效标识符

java.sql.SQLException: ORA-00904: "table_name"."column_name": invalid identifier

当我在sqldeveloper中打开表时,该列存在.

When I open up the table in sqldeveloper, the column is present.

该错误仅在PROD中发生,而不在DEV中发生.

The error is only happening in PROD, not in DEV.

我应该检查什么?

推荐答案

这可能是区分大小写的问题.通常,表和列不区分大小写,但是如果使用引号,它们将是大小写.例如:

It could be a case-sensitivity issue. Normally tables and columns are not case sensitive, but they will be if you use quotation marks. For example:

create table bad_design("goodLuckSelectingThisColumn" number);

这篇关于即使存在该列,为什么也有ORA-00904?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆