Home > Database > Mysql Tutorial > SQLServer LEN函数

SQLServer LEN函数

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 15:19:27
Original
2757 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:
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
Latest Issues
Problem with tp6 connecting to sqlserver database
From 1970-01-01 08:00:00
0
0
0
Unable to connect to SQL Server in Laravel
From 1970-01-01 08:00:00
0
0
0
Methods of parsing MYD, MYI, and FRM files
From 1970-01-01 08:00:00
0
0
0
SQLSTATE: User login failed
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template