On Sat, 4 Nov 2006, Igor Tandetnik wrote:

It is not equivalent. Your original query returns all rows in the table
(with category='natural' or otherwise) as soon as there is at least one
row with category='natural'. In other words, if there are 11 rows in the
table - one with category='natural' and ten with some other category value
- your query will return all 11 of them. In the same situation, the second
select will return just one row. It's not quite clear which way you want
it.

Igor,

  Thanks very much for the clarification; I didn't find a detailed
explanation of 'exists' in the SQLite book or other docs.

  I want the latter case. In other words, if there are no records where
'category = "natural"' nothing should be returned. It would be nice if there
was a return value that told me explicitly "no records match the where".

Rich

--
Richard B. Shepard, Ph.D.               |    The Environmental Permitting
Applied Ecosystem Services, Inc.(TM)    |            Accelerator
<http://www.appl-ecosys.com>     Voice: 503-667-4517      Fax: 503-667-8863

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to