开发者

IF ELSE statement SQLite

Could anyone help me write up an If Else statement for iPhone's SQLite?

I need a:

IF (SELECT COUNT (*) FROM ..... WHERE ... = '..') > 0 
BEGIN 
SELECT * FROM .... WHERE ... = '...' 
END

But I cannot get it to work. Is it even possible开发者_如何学Python with SQLite.

Thanks for any help!


SELECT 
  * 
FROM 
  .... 
WHERE 
  ... = '...' 
  AND (SELECT COUNT (*) FROM ..... WHERE ... = '..') > 0 
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜