mysql 取blob前4个字节 转成unsigned int
来源:互联网 发布:网络棋牌游戏开发教程 编辑:程序博客网 时间:2024/05/17 00:50
BLOB 即为table中的blob字段
select conv(concat(substr(HEX(BLOB),7,2), substr(HEX(BLOB), 5, 2), substr(HEX(BLOB), 3,2), substr(HEX(BLOB),1,2)), 16, 10) FROM table WHERE ID=xxx;
conv 转进制函数
concat 字符串连接函数
substr 取子字符串函数
HEX转16进制函数
为什么要用HEX 而不用BIN() OCT()呢?一个字节是4byte,HEX正好是4byte,BIN 1byte OCT 3byte 都不适合substr。
0 0
- mysql 取blob前4个字节 转成unsigned int
- C++:如何把一个int转成4个字节?
- C++:如何把一个int转成4个字节?
- 将字节数组转成Blob
- unsigned int mysql中的unsigned
- int unsigned int longlong unsigned longlong 的取值范围
- mysql int unsigned负数问题
- mysql unsigned int 避坑
- int long unsigned 取值范围
- char, signed char,unsigned char, short int unsigned short int, int数据类型取值问题
- Java中将byte数组中的4个数据转成int
- io中的字节转成字符的4个简单应用
- Mysql取分组后前N个值
- unsigned long unsigned int unsigned
- AES加密(AES/ECB/PKCS5Padding)key UTF8 取前十六个字节
- unsigned char, unsigned int
- unsigned int
- unsigned int
- linux-多线程
- A cycle was detected in the build path of project
- 应用程序与驱动通信的若干方式
- label 模糊看不清除,问题
- 加入这个CSDN的宣言
- mysql 取blob前4个字节 转成unsigned int
- 关于db2的一点记录
- 【转自】链接中 href='#' 和 href='###' 的区别
- poj 2777 Count Color【线段树段更新】
- Xwindows开发学习
- 寻找丑数
- Java判断字符是否是汉字,界限【 19968--171941 】
- poj3370,抽屉原理
- 【初识Oracle】④数据库对表格数据进行操作(含三张练习用表)