2009/3/28 Jay A. Kreibich <j...@kreibi.ch>:
> On Fri, Mar 27, 2009 at 05:37:49PM +0000, Dermot scratched on the wall:
>
>> The statement is:
>>
>> SELECT COUNT(*) FROM products WHERE productid=808800033 AND
>> (allowcountry2 & 0x0000000000000001)
>> SELECT COUNT(*) FROM products WHERE productid=808800033 AND
>> (allowcountry1 & 0x8000000000000000)
>>
>> I believe the allowcountry part is a bit pattern lookup but I can't
>> find a definition for the & and so I am not sure what the statement
>> does bar count the results.
>
>  To actually answer your question, yes, "&" in SQLite and some other
>  DBs is a bitwise "and" operator, just like the C/C++ "&" operator.
>  "|" is a bitwise "or".
>
>  It is my understanding that these operators are not part of the
>  SQL standard, but a number of databases implement the operator.

First off, sorry it was such an off-topic question. Thank you Jay for
the answer.

I can't find any reference to the ampersand's usage in my new book, my
copy of learning MySQL or the SQLite Syntax documentation. I would
have expected symbols to be listed before A in the index myself. There
are references to bitmap indices. Symbols refer to the BNF notation
but without reference to &. I have posted to SQLQueries.  Hopefully I
can get an understanding of what that statement means from there.

Again sorry for the post.
Dp.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to