为什么用相同的SQL语句调用同一台数据库的数据,在不同的电脑上的显示结果不一样呢
- 培训职业
- 2025-06-19 12:47:59
我最近也遇到同样问题,我是在本地数据库执行的,我电脑上的数据库和同学的是完全一样的(包括数据一模一样)执行同一个语句得到的结果中有个布尔值不一样!完全不能理解!我俩唯一不同的就是电脑我是xp他是win7!
执行select Spotent.*,if(src.id,1,0) from Spotent left join src on Spotent.id=src.spotentid where id_Splan = '8a96826651f68b420151f6aaa25d02c3' order by type desc, Spotent.id asc这句我的if(src.id,1,0) 值为0(是错的),同学的为1。若是改成下面这样就都正确
执行select Spotent.*,if(src.spotentid,1,0) from Spotent left join src on Spotent.id=src.spotentid where id_Splan = '8a96826651f68b420151f6aaa25d02c3' order by type desc, Spotent.id asc我们的就都为1(都正确)。
上一篇
教资出题人会被关起来吗
下一篇
消防证丢失怎么补办
多重随机标签