TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
SQL String Functions
Kml Surani
Jan 17, 2016
6.8k
0
1
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Print
Other Artcile
In this article you will learn about some SQL String functions.
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.
RDBMS
SQL Server
String Function
SQL String Function
Recommended Free Ebook
Basics of SQL Server
Download Now!
Similar Articles