• ADADADADAD

    mysql中怎么读取一个字符串长度[ 建站问答 ]

    建站问答 时间:2024-12-01 19:10:18

    作者:文/会员上传

    简介:

    mysql中读取一个字符串长度的示例:mysql>select*fromtest;+----+------------+-------+-----------+|id|name|score|subject|+----+------------+-------+-----------+|1|xia

    以下为本文的正文内容,内容仅供参考!本站为公益性网站,复制本文以及下载DOC文档全部免费。

    mysql中读取一个字符串长度的示例:

    mysql>select*fromtest;

    +----+------------+-------+-----------+

    |id|name|score|subject|

    +----+------------+-------+-----------+

    |1|xiaoming|89|shuxue|

    |2|xiaohong|89|shuxue|

    |3|xiaohong|80|english|

    |4|xiaohong|80|physics|

    |5|xiaohong|80|astronaut|

    |6|xiaoming|80|physics|

    |7|xiaoming|80|astronaut|

    |8|xiaoming|80|english|

    |9|xiaobai|80|astronaut|

    |10|1.2xiaobai|80|english|

    |11|2.2xiaobai|80|physics|

    |12|3xiaobai|80|shuxue|

    |13|123xiaohei|80|astronaut|

    |14|xiaohei|80|shuxue|

    |15|xiaohei|80|physics|

    |16|.12xiaohei|80|english|

    +----+------------+-------+-----------+

    16rowsinset(0.00sec)

    mysql>selectlength(name)fromtestwhereid=3;(查询id为3的name字符串长度)

    +--------------+

    |length(name)|

    +--------------+

    |8|

    +--------------+

    1rowinset(0.00sec)

    mysql中怎么读取一个字符串长度.docx

    将本文的Word文档下载到电脑

    推荐度:

    下载
    热门标签: msql字符串