Reputation: 2293
I want to do something like this:
select datediff('2010-01-21',(select date_of_birth from people));
and take as result the difference from each date_of_birth.
Upvotes: 1
Views: 230
Reputation: 8517
You can use datediff to get Difference in terms of day or specified format (either month, week year, days etc)
select datediff(DAY,'2010-01-21',date_of_birth)
from people
Upvotes: 4