sHASHI sHASHI - 9 months ago 59
MySQL Question

Mysql YEAR function not supported?

Display the CName, Bank Name and dateofopen for all the customers whose account is opened in 1998

SELECT CName, BankName,dateofopen FROM bank where dateofopen = YEAR(1968);

I tried with this query but getting error YEAR function not supported

I'm working on mysql terminal

Answer Source
SELECT CName, BankName,YEAR(dateofopen) FROM bank where YEAR(dateofopen) = 1968;