I have a birthdate, year, month, day columns where columns "year,month,day" are foreign key to other tables
What I want to do is for each birthdate get id(year(birthdate)) to be the value of year column and the same thing for month and day columns.
How can I do this in MySQL?
Thanks in advance