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. -j -- Jay A. Kreibich < J A Y @ K R E I B I.C H > "Our opponent is an alien starship packed with atomic bombs. We have a protractor." "I'll go home and see if I can scrounge up a ruler and a piece of string." --from Anathem by Neal Stephenson _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users