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

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

                  相关文档推荐

                  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 查询中包含缺失的月份)

                    • <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>