mysql截取多余的字符
截取数据库表中字符,大于50长度的其余部分截掉,并加“......”,不大于的原样输出:select bookid,(case when length(bookContent)>50then concat(left(bookContent,44),'......')else bookContentend)
·
截取数据库表中字符,大于50长度的其余部分截掉,并加“......”,不大于的原样输出:
select bookid,
(case when length(bookContent)>50
then concat(left(bookContent,44),'......')
else bookContent
end)
bookContent
from tbooks
更多推荐
已为社区贡献9条内容
所有评论(0)