If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > MYSQL calculate age from dob and save it to the table

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-20-11, 21:42
reneivan313 reneivan313 is offline
Registered User
 
Join Date: Jun 2011
Posts: 1
Talking MYSQL calculate age from dob and save it to the table

has the title say, i wonder if anyone of you out there, can help me with a query,, to calculate the age from dob and added to my table, that has already a column called 'AGE'
Reply With Quote
  #2 (permalink)  
Old 06-21-11, 03:45
healdem healdem is offline
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,250
don't store something such as age in a table, its derived data, and should be derived as and when required.

Age is a particularly good example of why you don't store derived data, as effectively you would have to run this query every night to keep the value of age up to date

mysql calculate age - Google Search

mysql calculate age - Google Search
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On