0

以下代码工作正常:

select e.id, e.textOne,
CASE 
WHEN CHAR_LENGTH(e.textTwo) > 30 THEN CONCAT(SUBSTRING(e.textTwo, 1, 30), '...')
ELSE e.textTwo
END AS textTwo 

如何在不破坏单词的情况下截断字符串?我无法得到解决方案(我试过:String truncate on length, but no chopper of words allowed)。有什么帮助吗?谢谢!

4

0 回答 0