开发者

Bitwise shift in mysql

开发者 https://www.devze.com 2023-03-19 14:53 出处:网络
How can I make a bitwise sh开发者_Python百科ift in MySQL? Is there any specific instruction or operator? If not, how to simulate it optimally?Have a look at the bitwise operators in MySQL first: http:

How can I make a bitwise sh开发者_Python百科ift in MySQL? Is there any specific instruction or operator? If not, how to simulate it optimally?


Have a look at the bitwise operators in MySQL first: http://dev.mysql.com/doc/refman/5.0/en/bit-functions.html

Then you have left shift:

http://dev.mysql.com/doc/refman/5.0/en/bit-functions.html#operator_left-shift

And right shift:

http://dev.mysql.com/doc/refman/5.0/en/bit-functions.html#operator_right-shift


To use a bitwise shift in MySQL, you can use << or >> for left shift or right shift respectively.


Looks like there is shift operators available, ie >> for right shift.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号