SQL HOME SQL Intro SQL Syntax SQL Select SQL Select Distinct SQL Where SQL An Or, Not SQL Order By SQL Insert Into SQL Null Values SQL Update SQL Delete SQL Select Top SQL Min and Max SQL Count, Avg, Sum SQL Like SQL Wildcards SQL In SQL Between SQL Aliases SQL Joins SQL Inner Join SQL Left Join SQL Right Join SQL Full Join SQL Self Join SQL. The function simply counts the number characters and ignore whether the character(s) are single-byte or multi-byte. The return value is of datatype NUMBER.
If char is null, then this function returns null. If using a lower version of the SQL Server Database Engine, consider using the Unicode nchar or nvarchar data types to minimize character conversion issues.
If you use char or varchar, we recommend to: Use char when the sizes of the column data entries are consistent. Use varchar when the sizes of the column data entries vary considerably. In SQL Server, you can use LEN function, but note that it excludes trailing blanks. MySQL Char_Length Function WHERE Condition. In this example, we show you how to use Character length function at where condition.
Here, we used the MySQL char_length function in where clause to check whether the character length of a department column data is greater than or not.