美文网首页
SQL之按照年月查询数据

SQL之按照年月查询数据

作者: Cute_小肥鸡 | 来源:发表于2021-09-08 11:55 被阅读0次
select FTitle,YEAR(FTime) as `year`,MONTH(FTime) as `month` from T_DOC_Document where FOrgID='3' and YEAR(FTime)='2021'
SQL查询前,FTime字段格式:“年-月-日 时:分:秒” SQL查询后,将FTime字段分为year+month

相关文章

网友评论

      本文标题:SQL之按照年月查询数据

      本文链接:https://www.haomeiwen.com/subject/dnkvwltx.html