I want to do select with the condition that the column has a given month, and only brings results this month.
I was doing this, but it did not work.
SELECT * from funcionarios where dataEntrada = month(10);
I'm using mysql workbeanch
I want to do select with the condition that the column has a given month, and only brings results this month.
I was doing this, but it did not work.
SELECT * from funcionarios where dataEntrada = month(10);
I'm using mysql workbeanch
In order to filter certain records within MySQL, you can do the following:
Filtering records by Day
SELECT * FROM tabela WHERE DAY(data) = 'dia_escolhido'
Filtering records by month
SELECT * FROM tabela WHERE MONTH(data) = 'mes_escolhido'
Filtering records by Year
SELECT * FROM tabela WHERE YEAR(data) = 'ano_escolhido'
Using Day, Month, Year - can filter the data correctly.