SELECT candidate_num FROM candidate ORDER BY candidate_num
The results of the query above is:
We can see candidate_num is not in order. Following is the structure of this table. I cannot figure why the "2" is after "19".
CREATE TABLE `candidate` (
`id` int(5) NOT NULL AUTO_INCREMENT,
`candidate_num` varchar(10) NOT NULL,
`name` varchar(50) NOT NULL,
`age` int(3) NOT NULL,
`major` varchar(50) NOT NULL,
`company` varchar(50) NOT NULL,
`department` varchar(50) NOT NULL,
`native_place` varchar(50) NOT NULL,
`ethnicity` varchar(50) NOT NULL,
`highest_education` varchar(50) NOT NULL,
`group` varchar(50) DEFAULT NULL,
`is_elected` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE KEY `candidate_num` (`candidate_num`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=61 DEFAULT CHARSET=utf8;