sqlite数据库 查询结果
sex的值只能是1或2selectcount(*)fromOLADATAwhereNO1=1groupbyNO1selectcount(*)fromOLADATAwher...
sex 的值只能是1或2
select count(*) from OLADATA where NO1 = 1 group by NO1
select count(*) from OLADATA where sex = 1 and NO1 = 1 group by NO1
select count(*) from OLADATA where sex = 2 and NO1 = 1 group by NO1
前者的搜索结果 应该 等于 后两个的搜索结果之和 吧
但是结果是前者 大于 后两者之和 , 这是什么原因呢 展开
select count(*) from OLADATA where NO1 = 1 group by NO1
select count(*) from OLADATA where sex = 1 and NO1 = 1 group by NO1
select count(*) from OLADATA where sex = 2 and NO1 = 1 group by NO1
前者的搜索结果 应该 等于 后两个的搜索结果之和 吧
但是结果是前者 大于 后两者之和 , 这是什么原因呢 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询