Home > Database > Mysql Tutorial > body text

SQLServer LEN函数

WBOY
Release: 2016-06-07 15:19:27
Original
2705 people have browsed it

在SQLServer中,有时候要对数据表的某个字段的值做修改,比如去掉一个字,计算某一个列值的长度。 LEN函数 LEN 函数返回文本字段中值的长度。 SQL LEN语法 SELECT LEN(column_name) FROM table_name 使用lEN修改字符串 update TB_City set CityName=left(Cit

  在SQLServer中,有时候要对数据表的某个字段的值做修改,比如去掉一个字,计算某一个列值的长度。

  LEN函数

  LEN 函数返回文本字段中值的长度。

  SQL LEN语法

  SELECT LEN(column_name) FROM table_name

  使用lEN修改字符串

  update TB_City set CityName=left(CityName,LEN(CityName)-1) where CityName like '%市'

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!