• <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. 从查询结果中选择随机结果样本

      Select a random sample of results from a query result(从查询结果中选择随机结果样本)
      <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
                

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

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

                相关文档推荐

                ibtmp1是非压缩的innodb临时表的独立表空间,通过innodb_temp_data_file_path参数指定文件的路径,文件名和大小,默认配置为ibtmp1:12M:autoextend,也就是说在文件系统磁盘足够的情况下,这个文件大小是可以无限增长的。 为了避免ibtmp1文件无止境的暴涨导致
                SQL query to group by day(按天分组的 SQL 查询)
                What does SQL clause quot;GROUP BY 1quot; mean?(SQL 子句“GROUP BY 1是什么意思?意思是?)
                MySQL groupwise MAX() returns unexpected results(MySQL groupwise MAX() 返回意外结果)
                MySQL SELECT most frequent by group(MySQL SELECT 按组最频繁)
                Include missing months in Group By query(在 Group By 查询中包含缺失的月份)
                <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>
                            <tbody id='NVTju'></tbody>