ORA 00918- Column ambiguosly defined error [duplicate]

£可爱£侵袭症+ 提交于 2019-12-02 13:12:41

It is always a good idea to add the table name/alias to the column like this

select c.customer_id,
       c.customer_name, 
       c.customer_address, 
       o.order_id,
       o.order_date,
       o.amount 
from customers c
inner join orders o on c.customer_id = o.customer_id

If you don't then the DB don't know which column to take and both tables have a column named customer_id.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!