Mid*_*hat 3 mysql
在MySQL中
Select 1 from mytable
和
select null from mytable
两者都返回相同的行数.虽然select count(1) from mytable返回rowcount并且select count(null) from mytable总是返回0.为什么?
select count(1) from mytable
select count(null) from mytable
rek*_*o_t 6
COUNT 返回非NULL值的数量,这就是为NULL返回0的原因.
COUNT
归档时间:
15 年,11 月 前
查看次数:
461 次
最近记录: