select pt.hn,year(CURDATE())+543 as year_cur,timestampdiff(year,pt.birthday,CURDATE()) as age_cur
,year(timestampadd(YEAR,1,CURDATE()))+543 as year1,timestampdiff(year,pt.birthday,timestampadd(YEAR,1,CURDATE())) as age1
,year(timestampadd(YEAR,2,CURDATE()))+543 as year2,timestampdiff(year,pt.birthday,timestampadd(YEAR,2,CURDATE())) as age2
,year(timestampadd(YEAR,3,CURDATE()))+543 as year3,timestampdiff(year,pt.birthday,timestampadd(YEAR,3,CURDATE())) as age3
,year(timestampadd(YEAR,4,CURDATE()))+543 as year4,timestampdiff(year,pt.birthday,timestampadd(YEAR,4,CURDATE())) as age4
,year(timestampadd(YEAR,5,CURDATE()))+543 as year5,timestampdiff(year,pt.birthday,timestampadd(YEAR,5,CURDATE())) as age5
,year(timestampadd(YEAR,6,CURDATE()))+543 as year6,timestampdiff(year,pt.birthday,timestampadd(YEAR,6,CURDATE())) as age6
,year(timestampadd(YEAR,7,CURDATE()))+543 as year7,timestampdiff(year,pt.birthday,timestampadd(YEAR,7,CURDATE())) as age7
,year(timestampadd(YEAR,8,CURDATE()))+543 as year8,timestampdiff(year,pt.birthday,timestampadd(YEAR,8,CURDATE())) as age8
,year(timestampadd(YEAR,9,CURDATE()))+543 as year9,timestampdiff(year,pt.birthday,timestampadd(YEAR,9,CURDATE())) as age9
,year(timestampadd(YEAR,10,CURDATE()))+543 as year10,timestampdiff(year,pt.birthday,timestampadd(YEAR,10,CURDATE())) as age10
from patient pt
limit 10
ประมานนี้เปล่าครับ ถ้าเป็น mysql command