• <tfoot id='H53sb'></tfoot>
  • <small id='H53sb'></small><noframes id='H53sb'>

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

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

      <legend id='H53sb'><style id='H53sb'><dir id='H53sb'><q id='H53sb'></q></dir></style></legend>
      1. 如何获取 GROUP_BY 子句中的值列表?

        时间:2024-04-16

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

              1. <tfoot id='1FNWa'></tfoot>

                <small id='1FNWa'></small><noframes id='1FNWa'>

                  <tbody id='1FNWa'></tbody>
                  本文介绍了如何获取 GROUP_BY 子句中的值列表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  如果我在表格中有这样的数据

                  If I have data like this in a table

                  id   data
                  --   ----
                  1    1
                  1    2
                  1    3
                  2    4
                  2    5
                  3    6
                  3    4
                  

                  如何在查询中(在 sybase 服务器上)获得这样的结果?

                  How do I get results like this in a query (on sybase server)?

                  id   data
                  --   ----
                  1    1, 2, 3
                  2    4, 5
                  3    6, 4
                  

                  推荐答案

                  我知道在 MySQL 中有 GROUP_CONCAT 并且在 Sybase 我认为它是 LIST 如另一个答案所述:

                  I know that in MySQL there is GROUP_CONCAT and in Sybase I think it's LIST as stated in another answer:

                  SELECT id, LIST(data||', ')
                  FROM yourtable
                  GROUP BY id
                  

                  这篇关于如何获取 GROUP_BY 子句中的值列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:使用union mysql select查询分组 下一篇:如何按计算字段分组

                  相关文章

                • <legend id='nFof5'><style id='nFof5'><dir id='nFof5'><q id='nFof5'></q></dir></style></legend>

                  <tfoot id='nFof5'></tfoot>

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

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