最近发现一个BUG,没时间解决,先保存在这。
针对MYSQL的not in的一些东西,not in 对于String类型的识别能力不如Integer,同样一句话,查询第一遍一样,我把A表中的数据添加到A_alarm中,在执行本语句,第一种会出现重复现象,NOY IN里面的查询结果两个语句是一样的,不会出现重复,这两个属性都数据唯一,
SELECT * from A where `status`='run' and userGroupId=27
and mmsi not in (SELECT mmsi from A_alarm)
SELECT * from A where `status`='run' and userGroupId=27
and id not in (SELECT A_id from A_alarm)