Reputation: 31
i want to select data current year data should ignored table structure ( year
, month
, temp_air
, dry_temp
)
Select * from table where year(date)='not current year'`
what should i add to "not current year.
Upvotes: 1
Views: 95
Reputation: 172508
You may try like this:
where year(date)!=YEAR(CURDATE())
instead of
where year(date)='not current year'`
You may select whichever columns you want to select and ignore the rest.
SELECT month, temp_air, dry_temp from table where year(date)!=YEAR(CURDATE())
Upvotes: 1