如果找不到匹配项,返回的结果是什么 [英] What is this returning if a match isn't found

查看:111
本文介绍了如果找不到匹配项,返回的结果是什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果找不到匹配项,这是否返回零?如果没有,那我该怎么办?

Is this returning a zero if a match isn''t found? If not then how would I do that?

sprintf(queryString, "SELECT COUNT(*) FROM tblURLIP WHERE IP = '%s' AND IPStatus = '1' AND IPMax = '0' AND  IPType = 3", ipSrc);

推荐答案

如果选择count(*)会导致0行,因为where子句不会导致结果,您将获得0作为答案.
IF the Select count(*) results in 0 rows because the where clause does not lead to results, you will get 0 as answer.


这篇关于如果找不到匹配项,返回的结果是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆