Catch date previous to year 2000 Mysql

Asked

Viewed 47 times

3

I need to select all employees with employment date prior to the year 2000. How can I put this condition in the clause Where?

SELECT nome_funcionario FROM funcionario WHERE data_contratacao...

2 answers

5


I would do it differently, using the function YEAR().

SELECT nome_funcionario FROM funcionario WHERE YEAR(data_contratacao) < 2000

2

SELECT nome_funcionario FROM funcionario WHERE data_contratacao < '2000-01-01'

Browser other questions tagged

You are not signed in. Login or sign up in order to post.