加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > MySql教程 > 正文

php – MySQL:从总值中只显示200个字符

发布时间:2020-12-11 23:53:08 所属栏目:MySql教程 来源:网络整理
导读:我有一个MySQL表,其中包含一个名为description的字段,其中包含如下记录: Former cop Brian OConner partners with ex-con Dom Toretto on the opposite side of the law.Since Brian and Mia Toretto broke Dom out of custody,theyve blown across many bo

我有一个MySQL表,其中包含一个名为description的字段,其中包含如下记录:

Former cop Brian O’Conner partners with ex-con Dom Toretto on the opposite side of the law.Since Brian and Mia Toretto broke Dom out of custody,they’ve blown across many borders to elude authorities. Now backed into a corner in Rio de Janeiro,they must pull one last job in order to gain their freedom. As they assemble their elite team of top racers,the unlikely allies know their only shot of getting out for good means confronting the corrupt businessman who wants them dead. But he’s not the only one on their tail. Hard-nosed federal agent Luke Hobbs never misses his target. When he is assigned to track down Dom and Brian,he and his strike team launch an all-out assault to capture them. But as his men tear through Brazil,Hobbs learns he can’t separate the good guys from the bad.

如何显示前200个字符?像这样:

Former cop Brian O’Conner partners with ex-con Dom Toretto on the opposite side of the law.Since Brian and Mia Toretto broke Dom out of custody,they’ve blown across many borders to elude authorities.

最佳答案
SELECT LEFT(description,200)
FROM yourtable

相关文档here.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读