Yogesh Marwaha wrote:
> Hi!
>
> I am using sqlite 3.05 beta. I have created a table containing a field named
> 'title'. When I run the SQL Command : -
>
> select count(*) from master_table where title = "title"
>
> output is 885, i.e. count of all the rows in the table, whereas it should
> have returned the number of rows in which value of the field title is "title"
> (which is actually 10). Perhaps sqlite is comparing value of column named
> title with the column itself.
>
A string in double-quotes resolves to the name of a column if such
a column is available. Use single-quotes to force the string to
be interpreted as a string.
SELECT count(*) FROM master_table
WHERE title='title';
^ ^
| |
' not " here -^-----'
--
D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565