I'm trying to select all the people who have the anniversary date beyond 2000 This date has to be accurately taking into account the day and the month, not simply decreasing the year!
SELECT *
FROM usuarios
WHERE YEAR(nascimento) > 2000
Use the YEAR, MONTH, DAY
functions that take YEAR, MONTH, DAY from the date field:
SELECT * FROM usuarios
WHERE YEAR(nascimento) = '2000' AND MONTH(nascimento) = '07' AND DAY(nascimento) = '07'
If you have more than 1 value:
SELECT * FROM usuarios
WHERE YEAR(nascimento) = '2018' AND MONTH(nascimento) IN ('07','09','11')
In a sequential range:
SELECT * FROM usuarios
WHERE YEAR(nascimento) = '2018' AND MONTH(nascimento) BETWEEN '05' AND '12'
You can do this
SELECT * FROM usuarios WHERE nascimento >= 2000