MySQL truncate text with ellipsis

前端 未结 6 504
小鲜肉
小鲜肉 2021-01-04 01:14

Suppose I have a MySQL table of one column: \"Message\". It is of type TEXT. I now want to query all rows, but the text can be large (not extremely large but large) and I on

6条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-04 01:37

    Have a look at the MySQL string functions, documented here. You should be able to use some combination of substring and concat to achieve your desired behaviour.

提交回复
热议问题