• <legend id='U7Uum'><style id='U7Uum'><dir id='U7Uum'><q id='U7Uum'></q></dir></style></legend>
      <tfoot id='U7Uum'></tfoot>
        <bdo id='U7Uum'></bdo><ul id='U7Uum'></ul>

    1. <small id='U7Uum'></small><noframes id='U7Uum'>

        <i id='U7Uum'><tr id='U7Uum'><dt id='U7Uum'><q id='U7Uum'><span id='U7Uum'><b id='U7Uum'><form id='U7Uum'><ins id='U7Uum'></ins><ul id='U7Uum'></ul><sub id='U7Uum'></sub></form><legend id='U7Uum'></legend><bdo id='U7Uum'><pre id='U7Uum'><center id='U7Uum'></center></pre></bdo></b><th id='U7Uum'></th></span></q></dt></tr></i><div id='U7Uum'><tfoot id='U7Uum'></tfoot><dl id='U7Uum'><fieldset id='U7Uum'></fieldset></dl></div>
      1. 无效的标识符 SQL

        时间:2023-11-03
          • <bdo id='d35P2'></bdo><ul id='d35P2'></ul>

            <tfoot id='d35P2'></tfoot>

              1. <i id='d35P2'><tr id='d35P2'><dt id='d35P2'><q id='d35P2'><span id='d35P2'><b id='d35P2'><form id='d35P2'><ins id='d35P2'></ins><ul id='d35P2'></ul><sub id='d35P2'></sub></form><legend id='d35P2'></legend><bdo id='d35P2'><pre id='d35P2'><center id='d35P2'></center></pre></bdo></b><th id='d35P2'></th></span></q></dt></tr></i><div id='d35P2'><tfoot id='d35P2'></tfoot><dl id='d35P2'><fieldset id='d35P2'></fieldset></dl></div>
              2. <legend id='d35P2'><style id='d35P2'><dir id='d35P2'><q id='d35P2'></q></dir></style></legend>
                  <tbody id='d35P2'></tbody>

                <small id='d35P2'></small><noframes id='d35P2'>

                • 本文介绍了无效的标识符 SQL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  所以我有这个:

                  SELECT p.plantnaam,o.levcode,o.offerteprijs
                  FROM plant p, offerte o
                  JOIN (SELECT plantcode , MIN(offerteprijs) AS offprijs 
                        FROM offerte
                        GROUP BY plantcode) s
                    ON s.plantcode = p.plantcode
                    AND s.offprijs = o.offerteprijs
                  ORDER BY p.plantnaam,l.levcode
                  

                  显然在第 6 行,p.plantcode 突然神奇地变成了一个无效标识符.为什么是这样?为什么在此之前完全相同的表中的所有其他人都很好?

                  Appearently on the 6th row, p.plantcode is suddenly magically an invalid identifier. Why is this? and why are all the others from the exact same table perfectly fine before that point?

                  推荐答案

                  问题在于您正在混合 JOIN.您有隐式和显式连接.带有 ON 子句的显式 JOIN 语法比带有逗号的隐式连接具有更高的优先级.结果 plantofferte 表的别名在 ON 子句中将不可用.尝试在整个过程中使用相同的 JOIN 类型:

                  The problem is that you are mixing JOINs. You have both implicit and explicit joins. The explicit JOIN syntax with the ON clause has a higher precedence over the implicit join with the commas. As a result the alias for the plant and the offerte tables will not be available in the ON clause. Try using the same JOIN type throughout:

                  SELECT p.plantnaam, o.levcode, o.offerteprijs
                  FROM 
                  (
                    SELECT plantcode , MIN(offerteprijs) AS offprijs 
                    FROM offerte
                    GROUP BY plantcode
                  ) s
                  INNER JOIN plant p
                     ON s.plantcode = p.plantcode
                  INNER JOIN offerte o
                     ON s.offprijs = o.offerteprijs
                  ORDER BY p.plantnaam, l.levcode
                  

                  这篇关于无效的标识符 SQL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:如何在 SQLPlus 或 PL/SQL 中创建菜单 下一篇:如何记录更改列 DDL 操作

                  相关文章

                  <small id='k8PT7'></small><noframes id='k8PT7'>

                  <tfoot id='k8PT7'></tfoot>

                      <bdo id='k8PT7'></bdo><ul id='k8PT7'></ul>
                  1. <i id='k8PT7'><tr id='k8PT7'><dt id='k8PT7'><q id='k8PT7'><span id='k8PT7'><b id='k8PT7'><form id='k8PT7'><ins id='k8PT7'></ins><ul id='k8PT7'></ul><sub id='k8PT7'></sub></form><legend id='k8PT7'></legend><bdo id='k8PT7'><pre id='k8PT7'><center id='k8PT7'></center></pre></bdo></b><th id='k8PT7'></th></span></q></dt></tr></i><div id='k8PT7'><tfoot id='k8PT7'></tfoot><dl id='k8PT7'><fieldset id='k8PT7'></fieldset></dl></div>
                      <legend id='k8PT7'><style id='k8PT7'><dir id='k8PT7'><q id='k8PT7'></q></dir></style></legend>