PLSQL | LENGTHC Function Last Updated : 23 Sep, 2019 Comments Improve Suggest changes Like Article Like Report The PLSQL LENGTHC function is used for returning the length of the specified string using UNICODE complete characters. The char accepted by the LENGTHC function in PLSQL can be of any of the datatypes such as CHAR, VARCHAR2, NCHAR, NVARCHAR2, CLOB, or NCLOB. The value returned by the LENGTHC function is of datatype NUMBER. If char sent in the parameter has datatype CHAR, then the length includes all trailing blanks. If char is null, then this function returns null. Syntax: LENGTHC( string ) string - It is used to specify the string whose length you want to find out. Supported Versions of Oracle/PLSQL: Oracle 12c Oracle 11g Oracle 10g Oracle 9i Oracle 8i Example-1: DECLARE Test_String string(20) := NULL; BEGIN dbms_output.put_line(LENGTHC(Test_String)); END; Output: NULL Example-2: DECLARE Test_String string(20) := ''; BEGIN dbms_output.put_line(LENGTHC(Test_String)); END; Output: NULL Example-3: DECLARE Test_String string(20) := ' '; BEGIN dbms_output.put_line(LENGTHC(Test_String)); END; Output: 1 Example-4: DECLARE Test_String string(20) := 'Geeksforgeeks'; BEGIN dbms_output.put_line(LENGTHC(Test_String)); END; Output: 13 Example-5: DECLARE Test_String string(20) := ' Geeksforgeeks '; BEGIN dbms_output.put_line(LENGTHC(Test_String)); END; Output: 15 Comment More infoAdvertise with us Next Article PLSQL | LENGTHC Function S Shubrodeep Banerjee Follow Improve Article Tags : SQL SQL-PL/SQL Similar Reads PLSQL | LENGTH Function The PLSQL LENGTH function is used for returning the length of the specified string, in other words, it returns the length of char. The char accepted by the LENGTH function in PLSQL can be of any of the datatypes such as CHAR, VARCHAR2, NCHAR, NVARCHAR2, CLOB, or NCLOB. The value returned by the LENG 1 min read PLSQL | LENGTHB Function The PLSQL LENGTHB function is used for returning the length of the specified string using bytes instead of characters. The char accepted by the LENGTHB function in PLSQL can be of any of the datatypes such as CHAR, VARCHAR2, NCHAR, NVARCHAR2, CLOB, or NCLOB. The value returned by the LENGTHB functio 1 min read PLSQL | LENGTH2 Function The PLSQL LENGTH2 function is used for returning the length of the specified string, in other words, it returns the length of char. UCS-2 codepoints is a character encoding standard in which characters are represented by a fixed-length 16 bits (2 bytes). UCS-2 represents a possible maximum of 65, 53 2 min read PLSQL | LENGTH4 Function The PLSQL LENGTH4 function is used for returning the length of the specified string, using UCS4 code points. UCS-4 codepoints is a character encoding which allows the representation of each value as exactly four bytes (one 32-bit word). UCS-4 represents a possible value between 0 and hexadecimal 7FF 2 min read MySQL LENGTH() Function MySQL LENGTH() function returns the length of a string in bytes. SyntaxThe MySQL LENGTH function syntax is: LENGTH(string) ParametersThe LENGTH function accepts only one parameter. string: A specified string whose length is to be counted.MySQL LENGTH() Function ExamplesLet's look at examples of the 1 min read PLSQL | LN Function The LN function is an inbuilt function in PLSQL which is used to return the natural logarithm of a given input number. The natural logarithm of a number is the logarithm of that number to the base e, where e is the mathematical constant approximately equal to 2.718. This is written using the notatio 2 min read PLSQL | LEAST Function The LEAST is an inbuilt function in PLSQL which is used to return the least value from a given list of some expressions. These expressions may be numbers, alphabets etc. Syntax: LEAST(exp1, exp2, ... exp_n) Parameters Used: This function accept some parameters like exp1, exp2, ... exp_n. These each 2 min read PLSQL | LOG Function The PLSQL LOG function is used for returning the logarithm of n base m. The LOG function accepts two parameters which are used to calculate the logarithmic value. The LOG function returns a value of the numeric data type. This function takes as an argument any numeric data type as well as any non-nu 2 min read PLSQL | INSTRC Function The PLSQL INSTRC function is used for returning the location of a substring in a string, Unicode complete characters. The PLSQL INSTRC function searches a string for a substring specified by the user using characters and returns the position in the string that is the first character of a specified o 2 min read PLSQL | NCHR Function The PLSQL NCHR function is used for returning the character based on the number code in the national character set or in other words it returns the binary equivalent to the number in the national character set. The value returned by the NCHR function is always of the datatype NVARCHAR2. The NCHR fun 1 min read Like