Left String Function In SQL 2008

In this article i will explain how to use the Left string function.
  • 2557

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

Left (string , length )

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".

Left-function-in-sql.jpg

Categories

More Articles

© 2020 DotNetHeaven. All rights reserved.