Reputation: 133
I am new in Mysql. I just want to extract all data in my employee data using year in where class. I have only date column in my table and i want to execute a query using year to extract all data from from my table employee.
example: 2012-02-01 is date value in my column name date.
select * from emp where ??.
Upvotes: 0
Views: 81
Reputation: 6276
Easy and straight forward,
Select * FROM EMPLOYEETABLE WHERE YEAR(DateOfEmployeeColumn) = YourSuppliedYear
Upvotes: 2