mysql的varchar做大小判断问题
李子做IT 2010-07-13 10:34:30 环境 hibernate3,struts2,spring2.0
表 staff(
`id` int(11) NOT NULL AUTO_INCREMENT,
`contractterm` varchar(10) DEFAULT NULL,
PRIMARY KEY (`id`)
)ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=gbk;
做设计的时候没想到contractterm这个字段会在后来做判断.现在发现用hibernate作出的判断select到的数和直接在mysql中搜索到的值结果不一样.
请问除了修改contractterm类型外,还有什么好的方法可以让hibernate做比较吗?
例如
contractterm
3
select * from staff where contractterm <=3
thanks by phoenix