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

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

    <tfoot id='g8lKR'></tfoot>
    1. 从查询结果中选择随机结果样本

      时间:2023-09-18
      <legend id='7mED5'><style id='7mED5'><dir id='7mED5'><q id='7mED5'></q></dir></style></legend>
          <tbody id='7mED5'></tbody>
      • <small id='7mED5'></small><noframes id='7mED5'>

          <bdo id='7mED5'></bdo><ul id='7mED5'></ul>
        • <tfoot id='7mED5'></tfoot>

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

                本文介绍了从查询结果中选择随机结果样本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                这个问题询问获取随机(ish)记录样本在 SQL Server 上,答案是使用 TABLESAMPLE.Oracle 10 中是否有等价物?

                This question asks about getting a random(ish) sample of records on SQL Server and the answer was to use TABLESAMPLE. Is there an equivalent in Oracle 10?

                如果没有,是否有从查询集中获取随机结果样本的标准方法?例如,如何从正常返回数百万的查询中获取 1,000 条随机行?

                If there isn't, is there a standard way to get a random sample of results from a query set? For example how can one get 1,000 random rows from a query that will return millions normally?

                推荐答案

                SELECT  *
                FROM    (
                        SELECT  *
                        FROM    mytable
                        ORDER BY
                                dbms_random.value
                        )
                WHERE rownum <= 1000
                

                这篇关于从查询结果中选择随机结果样本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:什么是 DBMS 上下文中的 BLOB 下一篇:Oracle 中的 OVER 子句

                相关文章

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

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

                1. <tfoot id='NVTju'></tfoot>

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