Left String Function In SQL 2008
In this article i will explain how to use the Left string function.
Introduction
Returns the leftmost part of a character string str with the given number of characters. LEFT string function takes 2 arguments. First argument takes a string value and as second argument length parameter is entered as integer value. It returns NULL if any argument is NULL.
Syntax
where,
string- string value (expression character), it can be a constant, variable, or column. string can be of any data type, except text.
length- specifies number of characters.
Example
Return the five leftmost characters of the character string "microsoft".