如何使sql表显示年龄由特定公式计算?

The formula:

TIMESTAMPDIFF(YEAR, `date_of_birth`, CURDATE())

I have to manually execute this query:

UPDATE `squad` SET `age` = TIMESTAMPDIFF(YEAR, `date_of_birth`, CURDATE())

Every time I insert rows into table, also when there is a player's birthday it surely doesn't apply a new age.

Please make ensure that ,are you use datetime or date data type for date_of_birth in your table(not var char data type),if so then its working fine. and one more thing insert date_of_birth as Y-m-d format. For your doubt i create same table and run same query then its working fineenter image description here