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

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

        <bdo id='mgyUa'></bdo><ul id='mgyUa'></ul>
      1. <tfoot id='mgyUa'></tfoot>

        sqlite 选择日期条件

        sqlite select with condition on date(sqlite 选择日期条件)
          <tbody id='Y8YIa'></tbody>

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

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

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

                • 本文介绍了sqlite 选择日期条件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我有一个带有出生日期的 sqlite 表.我想执行一个查询来选择那些年龄超过 30 的记录.我已经尝试了以下但它不起作用:

                  I have an sqlite table with Date of Birth. I would like to execute a query to select those records where the age is more than 30. I have tried the following but it doesn't work:

                  select * from mytable where dob > '1/Jan/1980'
                  select * from mytable where dob > '1980-01-01'
                  

                  推荐答案

                  可以使用这样的东西:

                  select dateofbirth from customer Where DateofBirth  BETWEEN date('1004-01-01') AND date('1980-12-31');  
                  select dateofbirth from customer where date(dateofbirth)>date('1980-12-01');
                  select * from customer where date(dateofbirth) < date('now','-30 years');
                  

                  如果您使用的是 Sqlite V3.7.12 或更高版本

                  不要使用date(dateofbirth),只需使用dateofbirth.所以你的查询看起来像这样:

                  Dont use date(dateofbirth) just use dateofbirth. So your query would look like this:

                  select * from customer where dateofbirth < date('now','-30 years');
                  

                  这篇关于sqlite 选择日期条件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  Building a comma separated list?(建立一个逗号分隔的列表?)
                  Errors in SQL Server while importing CSV file despite varchar(MAX) being used for each column(尽管每列都使用了 varchar(MAX),但在导入 CSV 文件时 SQL Server 中出现错误)
                  How can I import an Excel file into SQL Server?(如何将 Excel 文件导入 SQL Server?)
                  Export table to file with column headers (column names) using the bcp utility and SQL Server 2008(使用 bcp 实用程序和 SQL Server 2008 将表导出到带有列标题(列名称)的文件)
                  Concat field value to string in SQL Server(将字段值连接到 SQL Server 中的字符串)
                  SQL Server Bulk insert of CSV file with inconsistent quotes(SQL Server 批量插入带有不一致引号的 CSV 文件)

                      • <bdo id='AvIaQ'></bdo><ul id='AvIaQ'></ul>
                      • <legend id='AvIaQ'><style id='AvIaQ'><dir id='AvIaQ'><q id='AvIaQ'></q></dir></style></legend>

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

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

                              <tbody id='AvIaQ'></tbody>