Subject Re: [firebird-support] Re: slow "where 1=0"
Author Doug Chamberlin
Adam wrote:
> One option is to check for an impossible primary key. Ours are all
> generator derived (so they start at 1), so we could use "where ID=0"
> to ensure no rows are returned. If you can't guarantee such records
> don't exist, then perhaps an impossible combination such as "where
> ID=0 and ID=1" would do the trick.

I agree. I usually just test for Primary_Key_Field "is NULL" since that
cannot usually happen. Has worked well for years.