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

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

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

      2. MySQL 删除与分组依据

        时间:2024-04-16
          <tbody id='PMKo9'></tbody>
        <tfoot id='PMKo9'></tfoot>

          <legend id='PMKo9'><style id='PMKo9'><dir id='PMKo9'><q id='PMKo9'></q></dir></style></legend>

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

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

                  <i id='PMKo9'><tr id='PMKo9'><dt id='PMKo9'><q id='PMKo9'><span id='PMKo9'><b id='PMKo9'><form id='PMKo9'><ins id='PMKo9'></ins><ul id='PMKo9'></ul><sub id='PMKo9'></sub></form><legend id='PMKo9'></legend><bdo id='PMKo9'><pre id='PMKo9'><center id='PMKo9'></center></pre></bdo></b><th id='PMKo9'></th></span></q></dt></tr></i><div id='PMKo9'><tfoot id='PMKo9'></tfoot><dl id='PMKo9'><fieldset id='PMKo9'></fieldset></dl></div>
                  本文介绍了MySQL 删除与分组依据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我在 MySQL 5.5 中成功运行了一个查询

                  I am running a query successfully using in MySQL 5.5

                  SELECT columnA
                  FROM
                    table
                  GROUP BY
                    columnA
                  HAVING
                    count(*) > 1
                  

                  但是,我需要使用 DELETE 运行相同的查询,但我有点不确定如何删除?即返回的结果应该被删除吗?

                  However, I need to run this same query using DELETE and I'm a little unsure how to delete ? i.e. the returned results should be deleted ?

                  有什么想法吗?

                  推荐答案

                  将其放在子查询中:

                  delete from table 
                  where columnA in (
                    select columnA
                    from (
                        select columnA
                        from YourTable
                        group by columnA
                        having count(*) > 1
                        ) t  
                  )
                  

                  这篇关于MySQL 删除与分组依据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:计算oracle中两个日期之间每小时的记录数 下一篇:将记录按小时或按天分组,并在 mysql 中用零或空值填充空白

                  相关文章

                    <legend id='a2fxn'><style id='a2fxn'><dir id='a2fxn'><q id='a2fxn'></q></dir></style></legend>
                  1. <tfoot id='a2fxn'></tfoot>

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

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