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
精彩评论