SQL Server String Functions

Source: Internet
Author: User
ASCII (character_expression) returns the ASCII code value of the leftmost character
Char (integer_expression)

Unicode (ncharacter_expression) returns the integer of the first character of the input expression according to the definition of the Unicode standard.
Nchar (integer_expression)

Lower (character_expression) is returned with lowercase characters in the string
Upper (character_expression)

Ltrim (character_expression) truncates left English Spaces
Rtrim (character_expression)

Len (string_expression) returns the number of characters (not bytes), excluding trailing English spaces.
Left (character_expression, integer_expression) trailing spaces may also be returned
Right (character_expression, integer_expression)
The position of the first character of substring (expression, start, length) is 1

Charindex (expression1, expression2 [, start_location]) position of expression1 in expression2
Patindex (% pattern %, expression) pattern should have wildcards, like
Reverse (character_expression) reverse string
Replace (string_expression, string_expression2, string_expression3) Replace the second expression in the first expression with the third expression
Stuff (character_expression, start, length, character_expression) Delete the content of the first expression by START and length and insert the fourth expression at the start position

Replication (character_expression, integer_expression) Duplicate string
Space (integer_expression) Duplicate integer_expression Space

Soundex (character_expression) returns a specific string of four lengths Based on the string.
Difference (character_expression, character_expression) compares the sounex return values of two expressions with several different characters. The return value is [0-4].

STR (float_expression [, length [, decimal]) returns the string value converted from a number.
Quotename (character_string [, quote_character]) returns a unicode string with a separator

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.