- 论坛徽章:
- 93
|
回复 3# Carl01Zhang
看来我的rp比较好,没发现问题:- mysql> select * from blobtest;
- +-----------------+
- | ttt |
- +-----------------+
- | rtgfgdagw45reqr |
- | asdfdfasdf |
- +-----------------+
- 2 rows in set (0.11 sec)
- mysql> select unhex( substr( hex(ttt), 1, 4) ) from blobtest;
- +----------------------------------+
- | unhex( substr( hex(ttt), 1, 4) ) |
- +----------------------------------+
- | rt |
- | as |
- +----------------------------------+
- 2 rows in set (0.00 sec)
- mysql> update blobtest set ttt = unhex( substr( hex(ttt), 1, 4) );
- Query OK, 2 rows affected (0.05 sec)
- Rows matched: 2 Changed: 2 Warnings: 0
- mysql> select * from blobtest;
- +------+
- | ttt |
- +------+
- | rt |
- | as |
- +------+
- 2 rows in set (0.00 sec)
- mysql> show create table blobtest;
- +----------+--------------------------------------------------------------------
- -----------+
- | Table | Create Table
- |
- +----------+--------------------------------------------------------------------
- -----------+
- | blobtest | CREATE TABLE `blobtest` (
- `ttt` blob
- ) ENGINE=InnoDB DEFAULT CHARSET=latin1 |
- +----------+--------------------------------------------------------------------
- -----------+
- 1 row in set (0.00 sec)
复制代码 |
|