MS SQL Server Concepts and Programming Question:

What Are the Character String Functions Supported by SQL Server 2005?

Tweet Share WhatsApp

Answers:

Answer #1SQL Server 2005 supports 23 character string functions:

* ASCII(char) - Returning the code value of a non-Unicode character.
* CHAR(int) - Returning the non-Unicode character of a code value.
* CHARINDEX(word, string, start_location) - Returning the location of the searched "word" in a string.
* DIFFERENCE(string1, string2) - Returning an integer value that indicates the difference between the SOUNDEX values of two strings.
* LEFT(string, length) - Returning a substring of "length" character from the left hand side.
* LEN(string) - Returning the number of characters in the string.
* LOWER(string) - Returning the same string with all upper case characters converted to lower case.
* LTRIM(string) - Returning the same string with leading spaces removed.
* NCHAR(int) - Returning the Unicode character of a code value.
* PATINDEX(pattern, string) - Returning the location of the "pattern" in a string.
* QUOTENAME(string, quote) - Returning the same string enclosed in "quote".

Answer #2 * REPLICATE(string, number) - Returning the same string repeated "number" of times.
* REVERSE(string) - Returning the same string with all character positions reversed.
* RIGHT(string, length) - Returning a substring of "length" characters from the right hand side.
* RTRIM(string) - Returning the same string with trailing spaces removed.
* SOUNDEX(string) - Returning a four-character (SOUNDEX) code to evaluate the similarity of two strings.
* SPACE(length) - Returning a string of "length" space characters.
* STR(number, precision, scale) - Returning a string representation of a numeric value.
* STUFF(string, start, length, new) - Returning the same string with one part being replaced.
* SUBSTRING(string, start, length) - Returning a substring.
* UNICODE(nchar) - Returning the code value of a Unicode character.
* UPPER(string) - Returning the same string with all lower case characters converted to upper case.

Download MS SQL Server PDF Read All 394 MS SQL Server Questions
Previous QuestionNext Question
How To Convert a Unicode Strings to Non-Unicode Strings?How To Insert New Line Characters into Strings?