mysql中binary相加的问题
我在mysql中有这样一段代码
|
1
2
3
4
5
6
7
8
|
declare @byte1 binary(1)declare @byte2 binary(1)declare @smallint smallintset @smallint = 675set @byte1 = @smallint & 0xFFset @byte2 = (@smallint & 0xFF00) / 0x100select @byte1 a, @byte2 b, @byte1+@byte2 c |
执行结果是:
a b c
0xA3 0x02 0xA302
from: http://bbs.csdn.net/topics/360146372

浙公网安备 33010602011771号