- 论坛徽章:
- 0
|
本帖最后由 ben1978 于 2010-12-16 22:33 编辑
0.
表a_article有如下字段
字段名 类型 整理
summary text utf8_general_ci
1. substr取长度20可以更新
update `a_article` set `summary`= SUBSTR(`summary`,1,20) where id=136
--------
影响了1行
2. substr取长度200不可以更新
update `a_article` set `summary`= SUBSTR(`summary`,1,200) where id=136
--------
影响了0行
3. 直接select substr 200没问题
select SUBSTR(`summary`,1,200) from `a_article` where id=136
----------------
SUBSTR(`summary`,1,200)
三围57.4 x 107.5 x17.55毫米,重183克,拥有500万像素摄像头和72...
4. 该字段长度为250
select length(`summary`) from `a_article` where id=136
----------------
length(`summary`)
250
求教各位达人,谢谢! |
|