Age Calculate With Function in Sql – Query Examples

Age Calculate With Function in Sql

With this post we will calculate age with a function. This function gets a parameter with date type. Returns integer value of the age.

When we execute the code above we must get succesful message. Now we can use the function. To use the function we can use the codes belows

Example – 1 : How old is a person born on “12-05-1990”?

Result: 20

Example-2 : List all students name, surname and age with ageCalc function.


506 rows

Example-3 List students name and surname whose age are 20

188 rows

About the author

Thomas Brown

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: