• <small id='0xzSc'></small><noframes id='0xzSc'>

      <tfoot id='0xzSc'></tfoot>

      1. <legend id='0xzSc'><style id='0xzSc'><dir id='0xzSc'><q id='0xzSc'></q></dir></style></legend>
          <bdo id='0xzSc'></bdo><ul id='0xzSc'></ul>

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

        从多个表中选择count(*)

        Select count(*) from multiple tables(从多个表中选择count(*))

          • <bdo id='oW6nn'></bdo><ul id='oW6nn'></ul>

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

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

              <tbody id='oW6nn'></tbody>
          • <legend id='oW6nn'><style id='oW6nn'><dir id='oW6nn'><q id='oW6nn'></q></dir></style></legend>

                  本文介绍了从多个表中选择count(*)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  如何从两个不同的表(称为 tab1tab2)中选择 count(*) 结果:

                  How can I select count(*) from two different tables (call them tab1 and tab2) having as result:

                  Count_1   Count_2
                  123       456
                  

                  我已经试过了:

                  select count(*) Count_1 from schema.tab1 union all select count(*) Count_2 from schema.tab2
                  

                  但我只有:

                  Count_1
                  123
                  456
                  

                  推荐答案

                  SELECT  (
                          SELECT COUNT(*)
                          FROM   tab1
                          ) AS count1,
                          (
                          SELECT COUNT(*)
                          FROM   tab2
                          ) AS count2
                  FROM    dual
                  

                  这篇关于从多个表中选择count(*)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  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='925t5'></bdo><ul id='925t5'></ul>

                      <small id='925t5'></small><noframes id='925t5'>

                      <tfoot id='925t5'></tfoot>

                          • <legend id='925t5'><style id='925t5'><dir id='925t5'><q id='925t5'></q></dir></style></legend>

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