求给位大侠指导:ORA-00918: column ambiguously defined
问题如下:
同样一段sql在DB101和DB_test这两个数据库(表结构一样,只是版本有不同,
DB101--oracle10.2.0.1.0,DB_test--oracle10.2.0.5.0)中执行,
DB101可以执行,没问题,DB_test报ORA-00918: column ambiguously defined,
表produce_info_mx,sample_manager_mx都含此字段sample_serial_number ,
两个数据库应该都报column ambiguously defined这个错误,怎么一个可以执行,另一个又不可以
sql如下:
select produce_info_mx.*,
produce_info.produce_name,
produce_info.produce_type,
item_info_mx.item_mx_name,
item_info_mx.item_mx_code
from produce_info_mx
inner join produce_info on produce_info_mx.produce_id =
produce_info.produce_id
inner join item_info_mx on item_info_mx.item_mx_id =
produce_info.item_id
inner join sample_manager_mx on sample_manager_mx.sample_mx_id =
produce_info_mx.produce_sample_id
and produce_info_mx.produce_fact_lib_num <
produce_info_mx.produce_library_number
and produce_info.PRODUCE_LIB_FLAG =