db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Imran Hussain <imr...@imranweb.com>
Subject Re: Does derby support bitwise operators in SQL?
Date Fri, 02 Mar 2007 15:02:11 GMT
Dan,

Thanks for the response. I wonder if there is any plan to add support 
for this in the future?

Imran.




Dan Karp wrote:
>> 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