LENGTH4
LENGTH4 in SQL is a function used to return the length of a data string in UTF-32 units. This value represents the number of UTF-32 characters present in the given data string.
Example
Output
Explanation
The LENGTH4
function in Oracle SQL returns the length of a string, measuring it in characters, rather than bytes. The function returns 6, indicating that the string ‘Oracle’ consists of 6 characters.
Example
Output
Explanation
The LENGTH function in SQL Server is used to return the number of characters in a specified string. In the provided example, the LENGTH function returns the number of characters in the string ‘SQL SERVER’, which is 7.