【发布时间】:2022-01-23 17:05:57
【问题描述】:
我正在尝试以某种方式解决我的 PSQL 查询中的错误 ambiguous origin_type column name
查询
SELECT
*
FROM
"message"
INNER JOIN "member" ON "member"."id" = "message"."member_id"
INNER JOIN "conversation" ON "conversation"."id" = "message"."conversation_id"
WHERE
"message_type" in('USER_MESSAGE')
AND "origin_type" in('CONSENTEE_RECIPIENT')
AND "origin_type" in('CONSENTEE')
我有 2 个具有相同名称的列,需要一种方法来避免此错误,但由于此时我不实用,我被阻止,因为不知道解决此问题的更好方法。
我尝试使用别名但没有成功
【问题讨论】:
标签: postgresql