Hello All, I am having one field in my database table which can have 0 or 1 value. If it is having 0 value then the the value should be assigned as 'No' & if it is having value as 1 then its value should be assigned as 'Yes'. I want to do this assignment in select query. How can I do that? Please help me. Thanks in advance.
use a field type, called ENUL
you can make a list of the options, for example 'Y','N'
in other case, you have to use IF in your SQL query, like:
SELECT IF(`field`>0 ,'Y','N')AS f FROM `table`