• <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 选择日期条件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  ibtmp1是非压缩的innodb临时表的独立表空间,通过innodb_temp_data_file_path参数指定文件的路径,文件名和大小,默认配置为ibtmp1:12M:autoextend,也就是说在文件系统磁盘足够的情况下,这个文件大小是可以无限增长的。 为了避免ibtmp1文件无止境的暴涨导致
                  SQL query to group by day(按天分组的 SQL 查询)
                  What does SQL clause quot;GROUP BY 1quot; mean?(SQL 子句“GROUP BY 1是什么意思?意思是?)
                  MySQL groupwise MAX() returns unexpected results(MySQL groupwise MAX() 返回意外结果)
                  MySQL SELECT most frequent by group(MySQL SELECT 按组最频繁)
                  Include missing months in Group By query(在 Group By 查询中包含缺失的月份)

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