Length SQL | Length Function in SQL - sql - sql tutorial - learn sql

  • The Length function in SQL is used to get the length of a string. This function has a different name for different databases:
    • MySQL : LENGTH( )
    • Oracle : LENGTH( )
    • SQL Server: LEN( )
 representation of length function in sql
Tags : sql tutorial , pl sql tutorial , mysql tutorial , oracle tutorial , learn sql , sql server tutorial


  • The syntax for the Length function is as follows:
Length (str)
  • The length of the string str is returned.


  • We use the following table for our examples.

Table Geography

Region_Name Store_Name
East Boston
East New York
West Los Angeles
West San Diego

Example 1

SELECT Length (Store_Name) 
FROM Geography 
WHERE Store_Name = 'Los Angeles';


Length (Store_Name)

Example 2

SELECT Region_Name, Length (Region_Name) 
FROM Geography;


Region_Name Length (Region_Name)
East 4
East 4
West 4
West 4

This tutorial provides more the basic needs and informations on sql tutorial , pl sql tutorial , mysql tutorial , sql server , sqlcode , sql queries , sql , sql formatter , sql join , w3schools sql , oracle tutorial , mysql , pl sql , learn sql , sql tutorial for beginners , sql server tutorial , sql query tutorial , oracle sql tutorial , t sql tutorial , ms sql tutorial , database tutorial , sql tutorial point , oracle pl sql tutorial , oracle database tutorial , oracle tutorial for beginners , ms sql server tutorial , sql tutorial pdf

Related Searches to Length Function in SQL

Adblocker detected! Please consider reading this notice.

We've detected that you are using AdBlock Plus or some other adblocking software which is preventing the page from fully loading.

We don't have any banner, Flash, animation, obnoxious sound, or popup ad. We do not implement these annoying types of ads!

We need money to operate the site, and almost all of it comes from our online advertising.

Please add wikitechy.com to your ad blocking whitelist or disable your adblocking software.