报错:ORA00918: 未明确定义列

报错信息:

 错误代码:

<select id="selectSubList" resultMap="resultCtsProduct">
        select t1.*,t2.*
        from b_cts_product t1 inner join b_product t2
        on t1.subtypeno=t2.esc_subtypeno
        where t1.isvalid='1' and t2.is_valid='1'
        <if test="productName!=null and productName!=''">
            AND t1.product_name like #{productName}||'%'
        </if>
        <if test="drugIdCode!=null and drugIdCode!=''">
            AND t1.drug_id_code like #{drugIdCode}||'%'
        </if>
        <if test="entityId!=null and entityId!=''">
            AND t2.entity_id =#{entityId}
        </if>
    </select>

原因分析:由于t1表和t2表中都存在create_time、update_time、create_user、update_user,在select后面出现了重复的字段。故报错。

原文地址:https://www.cnblogs.com/zwh0910/p/15469749.html