db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Karp <dk...@zimbra.com>
Subject Re: Does derby support bitwise operators in SQL?
Date Thu, 01 Mar 2007 23:22:09 GMT
> I'd like to know if Derby supports bitwise operators in SQL
> statements. 

Nope.  Wish it did, but nope.

> select *
> from MyTable
> where (status & 5) = 5

One workaround is:

SELECT * FROM mytable
WHERE MOD(status, 2) = 1 AND MOD(status / 4, 2) = 1;

Mime
View raw message