I have the following table and data:
CREATE TABLE `test` (
`id` int(11) NOT NULL auto_increment,
`name` varchar(8) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
INSERT INTO `test` (`id`, `name`) VALUES (1, 'test');
INSERT INTO `test` (`id`, `name`) VALUES (2, 'test ');
When I do either of the following queries, it returns 2 rows (both rows):
SELECT * FROM test WHERE name = 'test';
SELECT * FROM test WHERE name IN ('test');
Can anyone explain this to me and/or how to fix it?
I'm runing MySQL 5.0.27.