我想选择当前年份数据应该忽略表结构(year
,month
,temp_air
,dry_temp
)
Select * from table where year(date)='not current year'`
我应该在“不是当年”中添加什么。
最佳答案
你可以这样尝试:
where year(date)!=YEAR(CURDATE())
代替
where year(date)='not current year'`
您可以选择您想要选择的任何列并忽略其余列。
SELECT month, temp_air, dry_temp from table where year(date)!=YEAR(CURDATE())
关于mysql - 从表中选择没有当前年份的数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20382268/