Introduction
SQL Server String functions are scalar functions that perform an operation on a string input values and return a string or numeric value. SQL Server String built-in function. In this section, we cover string function seen in SQL. Different RDBMS may employ different string functions.
List Of String Function
- ASCII
- CHAR
- REVERSE
- UPPER
- LEFT
- LEN
- LOWER
- LTRIM
- NCHAR
- REPLACE
Explanation Of All Above Functions
- ASCII
Return the ASCII code value of the left most character of the current string. ASCII() works for characters with numeric values from 0 to 255. Here’s Figure 1.1.
- CHAR
Convert an int ASCII code to character. Null Values are skipped. It is opposite to ASCII() function. Here’s Figure 1.2.
- REVERSE
Return the string with the order the characters reversed. See reverse string in Figure 1.3.
- UPPER
Returns a UPPER case string. Here’s Figure 1.4 and you can see lower string value converted to upper case string.
- LEFT
Returns the left part of a character string with the specified number of characters. Here’s Figure 1.5 Left() function two arguments:
1. String
2. Length of string
- LEN
Returns the number of characters, instead of the number of bytes of the specified string. Length of string in Figure 1.6.
- LOWER
Returns a character string after converting uppercase string to lower strings. Here’s string is UPPER case string To lower case string.
- LTRIM
Remove leading blanks spaces in string.
- NCHAR
Return specified integer code defined by Unicode standard. Same as Char() function. (Figure 1.9).
- REPLACE
Replace one string to second string. Replace() performs a case-sensitive match when searching for form_str.
SubashPosted Jul 14, 2016, 10:30 PM
Good work
Gowtham KPosted Jan 18, 2016, 10:39 AM
Good One
Mohammed IbrahimPosted Jan 18, 2016, 9:02 AM
nice
Raja TPosted Jan 18, 2016, 7:04 AM
Nice,Thanks for sharing
Debasis SahaPosted Jan 18, 2016, 4:07 AM
Nice One..
Former memberPosted Jan 18, 2016, 12:58 AM
Thanks
Ankit BansalPosted Jan 18, 2016, 12:31 AM
Really helpful..
Yashwant VishwakarmaPosted Jan 17, 2016, 11:47 PM
Nice article thanks for sharing !!
Santhakumar MunuswamyPosted Jan 17, 2016, 2:00 PM
Thanks for nice share