Why does '2000%' not work?
Why does the code
WHERE hire_date > '2000%';
Thanks for reaching out.
Please, use the following code:
WHERE year(hire_date) > 2000;
You need to use the
YEAR() function in order to extract the year from the hire_date column.
Another solution is:
hire_date LIKE '20%';
This code will give a result set with all years starting with
'20' which means all years bigger or equal to 2000.
Hope this helps.
can we use something like
WHERE hire_date > '2000-__-__';
and of course, we can use
WHERE hire_date > '2000-12-31';
which is the last day in 2000
But this answer is not practical and unprofessional