-1
我有这个表名= text_tab
如何比较使用php的mysql类型文本中的数据长度?
_________________________
| id | message |
| 1 | aaa |
| 2 | bb |
| 3 | ffff |
| 4 | ooooooo |
| 5 | gg |
我要检查排在message
列中的数据具有最大字符。 并且栏message
是text
类型。
我的回答将显示id=4
我使用ORDER BY消息递减,但不行,我该怎么做呢?
另外检查出几个集合函数http://www.mysqltutorial.org/mysql-aggregate-functions.aspx其中一个是'max()' –
@robert dewere'SELECT * FROM test_tab ORDER BY CHAR_LENGTH(message); ' –