zoukankan      html  css  js  c++  java
  • oracle 报错 column ambiguously defined

    column ambiguously defined

    ORA-00918: column ambiguously defined

    java.sql.SQLException: ORA-00918: column ambiguously defined
    ORA-00918: column ambiguously defined。中文名称:未明确定义的列!

    可能定义了两个相同的列


    你找找你后面的t里面是不是有两个相同的列,我也是这个问题,就是多了一个相同的列的查询,所以sb了..


    我出错的sql语句是


    select *

      from (select rownum as seq, t.*

              from (select item_code,

                           item_abv,

                           order_no,

                           unit_name,

                           assist_unit_name,

                           mb_qty,

                           inspection_qty,

                           mi_qty,

                           assist_mi_qty,

                           mo_qty,

                           assist_mo_qty,

                           on_hand_qty,

                           assist_qty,

                           ma_qty,

                           assist_ma_qty

                           assist_ma_qty -- 这一行出错了,列写重复了(删掉 运行,就ok啦)

                            -- assist_ma_qty as assist_ma_qty2 -- 不想删掉就这样写

                      from inv_book_master) t

             where rownum <= 10)

     where seq > 0


    或者你参考 我的另一个帖子,教你怎么换一种方式rownum 分页,http://hi.baidu.com/ae6623/item/aaa12115f2e4ca09e75c3635

  • 相关阅读:
    【题解】【HAOI2011】Problem b
    【题解】完全平方数
    sqoop安装
    hive安装
    hbase分布式安装
    zookeeper分布式安装
    hadoop分布式安装
    zabbix proxy安装及使用
    web数据存储
    js格式
  • 原文地址:https://www.cnblogs.com/ae6623/p/4416590.html
Copyright © 2011-2022 走看看