CodesCompiler
🔍
HTMLCSSJavaScriptPythonSQLPHPSEOPostsBooksKids About Contact 🚀 Get Started Free

SQL - String Functions

SQL - String Functions

SQL string functions are used primarily for string manipulation. The following table details the important string functions −

Sr.No.Function & Description1ASCII()Returns numeric value of left-most character2CHAR()Returns the character for each integer passed3CHARINDEX()Returns the position of a substring within the given string.4CONCAT_WS()Returns concatenate with separator5CONCAT()Returns concatenated string6DIFFERENCE()returns an integer value measuring the difference between the SOUNDEX() values of two different expressions(strings).7ESCAPE()Returns a text with escaped characters.8FORMAT()Returns the formatted string.9LEFT()Returns the extracting string.10LEN()Returns the length of the given string.11LOWER()Returns returns the lower case of the given string.12LTRIM()Returns a string after removing all the white spaces and characters from the string found on the left side.13NCHAR()Returns the Unicode character based on the number code.14PATINDEX()Returns the position of a pattern in a string.15QUOTENAME()Returns a string with a delimiter16REPLACE()Returns a new string by replacing all the occurrences of the particular part of a string (substring) with a specified string.17REPLICATE()Returns the repeated value.18REVERSE()Returns a reversed string.19RIGHT()Returns the rightmost characters from the actual(current) string.20RTRIM()Returns a string after removing all trailing blanks.21SOUNDEX()Returns the Soundex string.22SPACE()returns a string consisting of N number of space characters.23STR()Returns a number as string.24STRING_AGG()Concatenates the values of string expressions and places separator values between them.25STRING_SPLIT()Splits a string into rows of substrings.26STUFF()Returns a new string by inserting the second expression at the specified deleted place.27SUBSTRING()Returns the part of the character.28TRANSLATE()Returns a string from the first argument.29TRIM()Returns a trimmed string.30UNICODE()Returns an integer value of the first character.31UPPER()returns a string that has all the characters in upper case.