SQLite - Bitwise Operators


Advertisements


Example

Following are simple examples showing the usage of SQLite Bitwise Operators −

sqlite> .mode line
sqlite> select 60 | 13;
60 | 13 = 61

sqlite> select 60 & 13;
60 & 13 = 12

sqlite> select 60 ^ 13;
10 * 20 = 200


sqlite> select  (~60);
(~60) = -61

sqlite>  select  (60 << 2);
(60 << 2) = 240

sqlite> select  (60 >> 2);
(60 >> 2) = 15

sqlite_operators.htm

Advertisements