[英]org.postgresql.util.PSQLException:ERROR: relation "table_name" does not exist
Above is my Java JDBC Code以上是我的 Java JDBC 代码
and these are my list of database这些是我的数据库列表
Even though my relation name is not "railway" but it is railway (without qoutes) it is giving me error as:即使我的关系名称不是“铁路”但它是铁路(没有 qoutes)它给我的错误是:
org.postgresql.util.PSQLException:ERROR: relation "railway" does not exist
Position: 16
also what is this Position means?还有这个职位是什么意思?
The SELECT * FROM x
is a table query. SELECT * FROM x
是一个表查询。 When you connect to the database you connect to a database within the database software, and that database has tables which the query will be applied to.当您连接到数据库时,您将连接到数据库软件中的数据库,并且该数据库具有查询将应用到的表。
Without knowing what your tables are called I can't suggest what it should look like instead, except for that x should be exchanged for the [schema].[tablename]在不知道你的表叫什么的情况下,我不能建议它应该是什么样子,除了 x 应该交换为 [schema].[tablename]
You find the tables in the db by doing:您可以通过执行以下操作在数据库中找到表:
\c railway -- Connect to the database
\dt -- List database tables
in the database console.在数据库控制台中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.