pgAdmin 4 for Windows,查询错误,<column>不存在,提示:也许您想引用列<column>

问题描述 投票:0回答:1

我可以运行此查询:

select * from picker_data_entity

我可以运行此查询:

select * from bip

但是,当我尝试运行此查询时:

select * from picker_data_entity join bip on bip.id = picker_data_entity.bipId 

或者这个查询:

select "*" from picker_data_entity join bip on "bip.id" = "picker_data_entity.bipId"

我收到此错误:

ERROR:  column picker_data_entity.bipid does not exist
LINE 1: ...ct * from picker_data_entity join bip on bip.id = picker_dat...
                                                             ^
HINT:  Perhaps you meant to reference the column "picker_data_entity.bipId". 

SQL state: 42703
Character: 55

请帮我运行这个简单的联接查询。谢谢!

postgresql join pgadmin-4
1个回答
0
投票

您正在尝试通过

table_name.column_name
格式引用列。但是,您已将整个字符串括在双引号 (") 中。这使其成为单个标识符,该名称中恰好有一个点 (.)。由于 table_name 和 column_name 都是标识符,因此每个标识符都必须单独括在 double 内由于表名称不包含大写字母,因此不需要双引号,并且“*”也不会被解释为标识符。
id


© www.soinside.com 2019 - 2024. All rights reserved.