Normally, I just use my auto_increment field as my primary and index however, with this table I will never by selecting on the id just the usr_name. I read a post here talking about making the field that is searched on the primary I just wasn't sure if I was doing it right...Here is what I've tried:
Code: Select all
CREATE TABLE `test`.`tbl_test` (
`id` int(11) NOT NULL auto_increment,
`usr_name` text NOT NULL,
`sent_flag` tinyint(1) NULL DEFAULT '0',
PRIMARY KEY ( `usr_name`(1))
) ENGINE=MyISAM;