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

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

        时间:2023-06-02
          <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
                  

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

                  上一篇:保存多语言数据的最佳数据库结构是什么? 下一篇:Laravel Eloquent 与查询构建器 - 为什么使用 eloquent 来降低性能

                  相关文章

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

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