SQL Server String Functions
This page lists the commonly used string functions in SQL Server.
-
CHARINDEX
TheCHARINDEX()
function is one of the string functions in SQL Server, which is used to find the position of a substring in a string. -
CONCAT
In SQL Server, theCONCAT()
function is used to concatenate two or more strings into one string. -
LEFT
TheLEFT()
function is a SQL Server function used to extract the characters on the left side of a string. -
LEN
The SQL ServerLEN()
function is used to return the length (number of characters) of a string expression. -
LOWER
In SQL Server, theLOWER()
function is used to convert a string to lowercase. -
LTRIM
In SQL Server, theLTRIM()
function is used to remove the leading spaces of a string and return the result. -
PATINDEX
In SQL Server, thePATINDEX()
function is used to find the position of a pattern within a string. -
REPLACE
In SQL Server, theREPLACE()
function is used to replace specified characters or substrings in a string. -
REPLICATE
TheREPLICATE()
function is used to repeat a string a certain number of times to generate a new string. -
RIGHT
在 SQL Server 中,RIGHT()
函数用于返回指定字符串的右侧字符。 -
RTRIM
RTRIM()
is a string function in SQL Server used to remove trailing spaces from a string. -
STUFF
TheSTUFF()
function in SqlServer is used to delete a specified length of characters in a given string and insert new characters at the deleted position. -
SUBSTRING
In SQL Server, theSUBSTRING()
function is used to extract a substring from a specified string. -
TRIM
In SQL Server, theTRIM()
function is used to remove leading and trailing spaces from a string. -
UPPER
In SQL Server, theUPPER()
function is used to convert a string to uppercase letters.