Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

SqlServer Series Notes-string function

2025-01-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

LEN (): calculates the string length

LOWER (), UPPER (): turn to lowercase, uppercase

LTRIM (): remove the space on the left side of the string

RTRIM (): remove the space on the right side of the string

LTRIM (RTRIM ('bb'))

SUBSTRING (string,start_position,length)

Parameter string is the main string

Start_position is the starting position of the substring in the main string, and length is the maximum length of the substring.

Commonly used string functions

ASCII () gets the ASCII code value of the leftmost character

CHAR () converts ASCII codes into characters

LOWER () converts all strings to lowercase

LEFT () is used to get part of the string starting at the left

RIGHT () is used to get part of the string starting at the right

PATINDEX () gets the earliest occurrence of a specified character in a string

REVERSE () reverses the order of characters in a string

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report