SqlServer Series Notes-string function
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