Example usage is like the following:
CREATE TABLE persons( id INT NOT NULL AUTO_INCREMENT, name CHAR(30) NOT NULL, surname CHAR(30) NOT NULL, gender ENUM('male','female','unisex') NOT NULL, PRIMARY KEY (id,gender) ); INSERT INTO persons(name,surname,gender) VALUES('erman','gülhan','male'),('ayşe','dolu','female'),('ali','veli','male'); # this returns gender as string SELECT name,gender FROM persons; # this returns gender as numeric index SELECT name,gender+0 FROM persons;