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

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

  • <tfoot id='cItji'></tfoot>
          <bdo id='cItji'></bdo><ul id='cItji'></ul>
      1. <legend id='cItji'><style id='cItji'><dir id='cItji'><q id='cItji'></q></dir></style></legend>

        从 NOW() -1 天中选择记录

        Select records from NOW() -1 Day(从 NOW() -1 天中选择记录)

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

              <tfoot id='QUiUS'></tfoot>
              <legend id='QUiUS'><style id='QUiUS'><dir id='QUiUS'><q id='QUiUS'></q></dir></style></legend>

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

                  本文介绍了从 NOW() -1 天中选择记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  有没有办法在 MySQL 语句中按 >= NOW() -1 对记录进行排序(通过日期戳),以便选择从前一天到未来的所有记录?

                  Is there a way in a MySQL statement to order records (through a date stamp) by >= NOW() -1 so all records from the day before today to the future are selected?

                  推荐答案

                  根据 日期/时间函数的文档,您应该能够执行以下操作:

                  Judging by the documentation for date/time functions, you should be able to do something like:

                  SELECT * FROM FOO
                  WHERE MY_DATE_FIELD >= NOW() - INTERVAL 1 DAY
                  

                  这篇关于从 NOW() -1 天中选择记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  How to update a record using sequelize for node?(如何使用节点的 sequelize 更新记录?)
                  How to provide a mysql database connection in single file in nodejs(如何在 nodejs 中的单个文件中提供 mysql 数据库连接)
                  Looping Over Result Sets in MySQL(在 MySQL 中循环结果集)
                  How to get Top 5 records in SqLite?(如何获得 Sqlite 中的前 5 条记录?)
                  SQL Server SELECT where any column contains #39;x#39;(SQL Server SELECT,其中任何列包含“x)
                  Default row order in SELECT query - SQL Server 2008 vs SQL 2012(SELECT 查询中的默认行顺序 - SQL Server 2008 与 SQL 2012)
                  <legend id='tJY4J'><style id='tJY4J'><dir id='tJY4J'><q id='tJY4J'></q></dir></style></legend>

                      <tbody id='tJY4J'></tbody>
                    <tfoot id='tJY4J'></tfoot>
                      • <bdo id='tJY4J'></bdo><ul id='tJY4J'></ul>
                          • <small id='tJY4J'></small><noframes id='tJY4J'>

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