我知道有很多这样的问题,但我的问题不是如何摆脱这个错误,而是要知道它在早期的 9 版 Oracle 中是如何工作的。
我有一个用 Ruby 和 Oracle DB 编写的旧资源,最近升级到 version=11。
我无法编辑 Oracle DB 中的数据,只能读取。所以有两个表可以说:表A(id,name,type,customer)和表B(id,a_id,type,person)
所以。源码中有一个查询:
select a.id,b.id from a join b on a.id = b.a_id where type = 'A'
所以在 Oracle 9 中这工作得很好,但现在我遇到了“列不明确定义”错误。
我想知道的是:
where type = 'A'
是相同的
where a.type = 'A' AND b.type = 'A'
或者
where a.type = 'A' OR b.type = 'A'
?