I am no sql expert. I was trying to run following query on my oracle sqlplus prompt
select 0 AS initVal, loadTable.amount from accountsTable JOIN loadTable ON num=accNum , loadTable JOIN loanTable ON loadTable.numSeq=loanTable.numSeq
and getting following error
column ambiguously defined, which is pointing to loadTable.amount in select clause.
Little bit I am able to understand that there is a cartesian product of accountsTable JOIN loadTable ON num=accNum
and loadTable JOIN loanTable ON loadTable.numSeq=loanTable.numSeq
after which it is not able to understand from which table to pick loadTable.amount
, since result of both has this column.
Is there any way I can get rid of this problem without specifying another join between these two intermediate tables on loadTable.amount
?