• <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(*)

        时间:2023-09-20

          • <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(*)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:是否可以从 PL/SQL 块中输出 SELECT 语句? 下一篇:如何在 Oracle SQL Developer 中将查询结果导出到 csv?

                  相关文章

                    • <bdo id='925t5'></bdo><ul id='925t5'></ul>

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

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

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

                    2. <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>