Amudhan Kuppan

Amudhan Kuppan

  • 1.5k
  • 378
  • 12.3k

I have one doubt in sql

Mar 8 2018 12:03 AM
hi,
anyone help me how can i calculate the age in my table using sql 
what can i query written i will send one image please note that 
ALTER TABLE Student ADD Age AS DATEDIFF(YEAR, DateOfBirth, GETDATE())
this query can be written in my table 
my problem is i will insert new record at dob column is ;1983-11-16' so it display age as 35 
but iam checking age calculator website it display 34 
correct answer is 34 i know what query can be written in sql become as 34 please help me 

Attachment: age.rar

Answers (4)