I am trying to check the Age of a user from the Date Of Birth to make sure Age is between 16 and 80, When the data is inserted into the table
The Date of Birth is a DATE datatype
I have tired looked for multiple solutions and none of them check it when the data is inserted
I have found this help out article to get the current Date with only the Date: https://learnsql.com/cookbook/how-to-get-the-current-date-without-time-in-t-sql/#:~:text=To%20get%20the%20current%20date%20and%20time%20in%20SQL%20Server,20%2010%3A22%3A34%20.
But i can't seem to get it to work with the CHECK function when creating the table