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

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

        <bdo id='ev1uV'></bdo><ul id='ev1uV'></ul>

        oracle中选择查询的默认行排序

        Default row ordering for select query in oracle(oracle中选择查询的默认行排序)
      1. <tfoot id='udLtv'></tfoot>

          <legend id='udLtv'><style id='udLtv'><dir id='udLtv'><q id='udLtv'></q></dir></style></legend>

            • <small id='udLtv'></small><noframes id='udLtv'>

              • <bdo id='udLtv'></bdo><ul id='udLtv'></ul>
                  <i id='udLtv'><tr id='udLtv'><dt id='udLtv'><q id='udLtv'><span id='udLtv'><b id='udLtv'><form id='udLtv'><ins id='udLtv'></ins><ul id='udLtv'></ul><sub id='udLtv'></sub></form><legend id='udLtv'></legend><bdo id='udLtv'><pre id='udLtv'><center id='udLtv'></center></pre></bdo></b><th id='udLtv'></th></span></q></dt></tr></i><div id='udLtv'><tfoot id='udLtv'></tfoot><dl id='udLtv'><fieldset id='udLtv'></fieldset></dl></div>

                    <tbody id='udLtv'></tbody>
                  本文介绍了oracle中选择查询的默认行排序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  在 Oracle 中,如果未指定order by"子句,则选择查询的默认行顺序是什么.

                  是吗

                  1. 插入行的顺序
                  2. 根本没有默认排序
                  3. 以上都不是.

                  解决方案

                  根据 Tom Kyte 的说法:除非您将order by"添加到查询中,否则您无法对返回的行的顺序发表任何看法.好吧,缺少您不能依赖返回的行的顺序"."

                  参见这个问题 在 asktom.com.

                  至于 ROWNUM,它在物理上并不存在,因此无法释放".ROWNUM 是在从表中检索记录后分配的,这就是为什么WHERE ROWNUM = 5"总是无法选择任何记录的原因.

                  @ammoQ:您可能想阅读 这篇 AskTom 文章 关于 GROUP BY 排序.简而言之:

                  <块引用><块引用>

                  在查询中使用 Group By 子句保证输出数据为按分组依据列排序订单,即使没有 Order By条款?

                  我们说...

                  绝对不会,

                  从来没有,从来没有,从来没有会.

                  In Oracle, what is the the default ordering of rows for a select query if no "order by" clause is specified.

                  Is it

                  1. the order in which the rows were inserted
                  2. there is no default ordering at all
                  3. none of the above.

                  解决方案

                  According to Tom Kyte: "Unless and until you add "order by" to a query, you cannot say ANYTHING about the order of the rows returned. Well, short of 'you cannot rely on the order of the rows being returned'."

                  See this question at asktom.com.

                  As for ROWNUM, it doesn't physically exist, so it can't be "freed". ROWNUM is assigned after a record is retrieved from a table, which is why "WHERE ROWNUM = 5" will always fail to select any records.

                  @ammoQ: you might want to read this AskTom article on GROUP BY ordering. In short:

                  Does a Group By clause in an Query gaurantee that the output data will be sorted on the Group By columns in order, even if there is NO Order By clause?

                  and we said...

                  ABSOLUTELY NOT,

                  It never has, it never did, it never will.

                  这篇关于oracle中选择查询的默认行排序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Oracle PL/SQL - Raise User-Defined Exception With Custom SQLERRM(Oracle PL/SQL - 使用自定义 SQLERRM 引发用户定义的异常)
                  Oracle: is there a tool to trace queries, like Profiler for sql server?(Oracle:是否有跟踪查询的工具,例如用于 sql server 的 Profiler?)
                  SELECT INTO using Oracle(使用 Oracle SELECT INTO)
                  How to handle Day Light Saving in Oracle database(如何在 Oracle 数据库中处理夏令时)
                  PL/SQL - Use quot;Listquot; Variable in Where In Clause(PL/SQL - 使用“列表Where In 子句中的变量)
                  Oracle: Import CSV file(Oracle:导入 CSV 文件)

                    <bdo id='zH68b'></bdo><ul id='zH68b'></ul>
                  • <tfoot id='zH68b'></tfoot>
                          <tbody id='zH68b'></tbody>

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

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