sHASHI sHASHI - 1 month ago 5
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
SELECT CName, BankName,YEAR(dateofopen) FROM bank where YEAR(dateofopen) = 1968;
Comments