Very new to SQL and trying to set up a users table, I have a check box for financial aid that outputs a BIT 0 or 1, ideally what I would like to do is convert this value to a YES or NO depending on the value. Right now I'm not entirely sure how to do this, I've tried adding
SELECT CASE `financial_aid`
WHEN 1 THEN 'Yes'
WHEN 0 THEN 'No'
END As `financial_aid`
FROM `users`;
Currently this doesn't solve my problem, can anyone advise how I can fix this?
SQL
CREATE TABLE IF NOT EXISTS `users` (
`User_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`player_name` varchar(40) NOT NULL,
`gender` varchar(10) NOT NULL,
`dob` date NOT NULL,
`parent_name` varchar(40) NOT NULL,
`parent_email` varchar(40) NOT NULL,
`parent_phone` varchar(40) NOT NULL,
`experience` varchar(40) NOT NULL,
`financial_aid` bit NOT NULL,
`registration_date` datetime NOT NULL,
PRIMARY KEY (`User_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=10;
SELECT CASE `financial_aid`
WHEN 1 THEN 'Yes'
WHEN 0 THEN 'No'
END As `financial_aid`
FROM `users`;