views:

20

answers:

1

Essentially what I need to do is pull someone's age from the database which is stored as an integer and then perform a check as to whether they are over 18 or not.

The simple select of the row returns their age. The goal is to have the Row return either a "yes" or "no" if they are over the age of 18.

Normally I'd do this logic when the data was returned but the requirements are outside of my control.

A: 
select if(age>=18,'yes','no') as over_18 
from age_table
Ike Walker