PLSQL | CONVERT Function Last Updated : 19 Sep, 2019 Comments Improve Suggest changes Like Article Like Report The string in PL/SQL is actually a sequence of characters with an optional size specification. The characters could be numeric, letters, blank, special characters or a combination of all. The CONVERT function in PLSQL is used to convert a string from one character set to another. Generally, the destination character set contains a representation of all the characters defined in the source character set. If in any case, a character does not exist in the destination character set, a replacement character appears. These replacement characters can be defined as part of a character set definition. Syntax: CONVERT( string1, char_set_to [, char_set_from] ) Parameters Used - string1 - It is used to specify the string to be converted. It can be any of the datatypes CHAR, VARCHAR2, NCHAR, NVARCHAR2, CLOB, or NCLOB. char_set_to - It is used to specify the character set to which the string needs to be converted. char_set_from - It is an optional parameter which is used to specify the character set from which the string needs to be converted. Note - Both the destination and source character set arguments can be either literals or columns containing the name of the character set. Available Character Sets: US7ASCII : US 7-bit ASCII character set WE8DEC : West European 8-bit character set WE8HP : HP West European Laserjet 8-bit character set F7DEC : DEC French 7-bit character set WE8EBCDIC500 : IBM West European EBCDIC Code Page 500 WE8PC850 : IBM PC Code Page 850 WE8ISO8859P1 : ISO 8859-1 West European 8-bit character set Supported Versions of Oracle/PLSQL: Oracle 12c Oracle 11g Oracle 10g Oracle 9i Oracle 8i Example: DECLARE Test_String string(10) := 'A B C D'; Test_String2 string(20) := 'E Ä Ê Í'; BEGIN dbms_output.put_line(CONVERT(Test_String, 'US7ASCII', 'WE8ISO8859P1')); dbms_output.put_line(CONVERT(Test_String2, 'US7ASCII')); END; Output: A B C D E A E I Comment More infoAdvertise with us Next Article PLSQL | CONVERT Function S Shubrodeep Banerjee Follow Improve Article Tags : SQL SQL-PL/SQL Similar Reads MySQL | CONVERT( ) Function The MySQL CONVERT() function is used for converting a value from one datatype to a different datatype. The MySQL CONVERT() function is also used for converting a value from one character set to another character set. It accepts two parameters which are the input value and the type to be converted in 2 min read PLSQL | COS Function The PLSQL COS function is used to return the cosine of a numeric value. The COS function accepts one parameter which is the number whose cosine needs to be calculated. The COS function returns a value of the numeric data type. This function takes as an argument any numeric data type as well as any n 2 min read MySQL CONVERT_TZ() function MySQL CONVERT_TZ() function converts a given DateTime value from one time zone to another. The CONVERT_TZ() function in MySQL returns the DateTime value converted to the given time zone. If the value provided in the function is invalid, it returns NULL. SyntaxMySQL CONVERT_TZ() function syntax is CO 2 min read PLSQL | CHR Function The string in PL/SQL is actually a sequence of characters with an optional size specification. The characters could be numeric, letters, blank, special characters or a combination of all. The CHR Function in PLSQL is the opposite of the ASCII function and is used to return the character based on the 1 min read MySQL | CONV( ) Function The MySQL CONV() function is used for converting a number from one numeric base system to another. The value returned by the CONV() function is in the form of a string value. It accepts three parameters which are the value to be converted, the current numeric base system and the numeric base system 2 min read PLSQL | COSH Function The PLSQL COSH function is used to return the hyperbolic cosine of a numeric value. The COSH function accepts one parameter which is the number whose hyperbolic cosine needs to be calculated. The COSH function returns a value of the numeric data type. This function takes as an argument any numeric d 2 min read PLSQL | ACOS Function The PLSQL ACOS function is used to return the arc cosine of a number. The ACOS function only one parameter which is a number and the argument number must be in the range of -1 to 1, and the function returns a value in the range of 0 to pi, expressed in radians. This function takes as an argument any 2 min read PLSQL | CEIL Function The CEIL is an inbuilt function in PLSQL which is used to return the smallest integer value which is either greater than or equal to the given input number. This input number might be in the fraction or in the whole number. Syntax: CEIL(number) Parameters Used: Here the parameter number is the input 2 min read PLSQL | EXTRACT Function The PLSQL EXTRACT function is used for extracting a specific value such as year, month, day or hour from a date or an interval value. Syntax: EXTRACT(field FROM source) Parameters Used: The EXTRACT function accepts two parameters : field - It is used to specify the component that needs to be extract 2 min read PLSQL | COMPOSE Function The string in PL/SQL is actually a sequence of characters with an optional size specification. The characters could be numeric, letters, blank, special characters or a combination of all. The Compose Function in PLSQL is used to return a Unicode string. The unistring values that can be combined with 1 min read Like