SQL 2008 LEN Function

In this article i will explain how to use the LEN string function.
  • 2598

Introduction

LEN() is a string function and returns number of character in a specified string expression.

Syntax

select  LEN(column_name) from table_name

Example

Suppose we have table named Employee as.

Create-Table-in-sql.jpg

To select the length of the values in the "F_Name" column.

sql_func_len.jpg

To returns number of characters in a string "Example Of LEN Function".

LEN-function-in-sql.jpg

Categories

More Articles

© 2020 DotNetHeaven. All rights reserved.