By 25/02/2016 1 Comments

What Are LEN() & LENGTH() Functions In SQL?

  • SQL LEN() and SQL LENGTH()functions are used to find the length of a specific value of a table column.
  • SQL LEN() function is used in SQL Server database system and returns the length of a value in a specific column.
  • SQL LENGTH() function is used in MySQL database system and it also returns the length of a value in a specific column.

Syntax: SQL Server

SELECT LEN(column) FROM table_name;

Example:

SELECT id, product_name, LEN(product_name) AS "Length of product_name", price
FROM products;

Syntax: MySQL

SELECT LENGTH(column) FROM table_name;

Example:

SELECT id, product_name, LENGTH(product_name) AS "Length of product_name", price
FROM products;






Posted in: Sql

Leave your valuable Comment

Have a natural attraction for women cosmetics and replica watches uk clothes, no
more than two for men the most attractive one, is to make their own driving experience, happy and can serve as the facade of the car, another is to highlight the taste edify sentiment rolex replica watch. The replica rolex is undoubtedly the most fashionable accessories, wear a suit to attend the activities, but also get a decent match on the replica watches .