SQL LEN() Function

Submitted by admin on

The LEN function is useful to count the number of characters in a column you specified as the parameter. LEN is short for length. The LEN function returns the number of characters including spaces or any character within that column.

You can use SQL Alias to name the result of the LEN function.

SQL LEN() Syntax

SQL COUNT() Function

Submitted by admin on

COUNT is a simple aggregate function provided by SQL. As it is clear from its name that it simply counts the number of records in the table and returns the total count.

There are three (3) different usage for the Count function.

  • SQL COUNT(column_name)
  • COUNT(*)
  • COUNT(DISTINCT column_name)

Consider the following table for this exercise

Employess