Please visit DEMANDDRAFT.SHOP for quality of products...

Ad

Search This Blog

Tuesday, July 17, 2012

SUBSTRING Function in SQl Server

SUBSTRING

Substring returns the part of the string from a given character expression. The general syntax of Substring is as follows :

SUBSTRING(expression, start, length)

Here the function gets the string from start to length. Let us take an example below:

SELECT OUT = SUBSTRING('abcdefgh', 2, 3)

The output will be "bcd". 

Note : substring also works on ntext, VARCHAR, CHAR etc.

No comments:

Post a Comment