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

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

        单个查询中的多个选择语句

        Multiple select statements in Single query(单个查询中的多个选择语句)
          <tbody id='GPR55'></tbody>

          • <small id='GPR55'></small><noframes id='GPR55'>

              <bdo id='GPR55'></bdo><ul id='GPR55'></ul>

                <tfoot id='GPR55'></tfoot>
              • <legend id='GPR55'><style id='GPR55'><dir id='GPR55'><q id='GPR55'></q></dir></style></legend>
                  <i id='GPR55'><tr id='GPR55'><dt id='GPR55'><q id='GPR55'><span id='GPR55'><b id='GPR55'><form id='GPR55'><ins id='GPR55'></ins><ul id='GPR55'></ul><sub id='GPR55'></sub></form><legend id='GPR55'></legend><bdo id='GPR55'><pre id='GPR55'><center id='GPR55'></center></pre></bdo></b><th id='GPR55'></th></span></q></dt></tr></i><div id='GPR55'><tfoot id='GPR55'></tfoot><dl id='GPR55'><fieldset id='GPR55'></fieldset></dl></div>
                  本文介绍了单个查询中的多个选择语句的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在用 php (mysql) 生成报告,

                  I am generating a report in php (mysql),

                  例如:

                  `select count(id) as tot_user from user_table
                   select count(id) as tot_cat from cat_table
                   select count(id) as tot_course from course_table`
                  

                  像这样我有 12 张桌子.

                  Like this I have 12 tables.

                  我可以在单个查询中创建它吗?如果我做了?进程变慢?

                  Can i make it in single query. If i did? Process gets slow?

                  推荐答案

                  SELECT  (
                      SELECT COUNT(*)
                      FROM   user_table
                  ) AS tot_user,
                  (
                      SELECT COUNT(*)
                      FROM   cat_table
                  ) AS tot_cat,
                  (
                      SELECT COUNT(*)
                      FROM   course_table
                  ) AS tot_course
                  

                  这篇关于单个查询中的多个选择语句的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  Bogus foreign key constraint fail(虚假外键约束失败)
                  how to get last insert id after insert query in codeigniter active record(如何在codeigniter活动记录中插入查询后获取最后一个插入ID)
                  Force InnoDB to recheck foreign keys on a table/tables?(强制 InnoDB 重新检查表/表上的外键?)
                  How to auto generate migrations with Sequelize CLI from Sequelize models?(如何使用 Sequelize CLI 从 Sequelize 模型自动生成迁移?)
                  Clear MySQL query cache without restarting server(无需重启服务器即可清除 MySQL 查询缓存)
                  ALTER TABLE to add a composite primary key(ALTER TABLE 添加复合主键)

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

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

                    <tbody id='aIuKE'></tbody>

                      <tfoot id='aIuKE'></tfoot>

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