MySQL | CONV( ) Function Last Updated : 21 Nov, 2019 Comments Improve Suggest changes Like Article Like Report 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 to which the value needs to be converted. The CONV() function treats a number as an unsigned number if a positive value is specified for the new base whereas, the CONV() function treats a number as a signed number if a negative new base is specified. Syntax: CONV(number, current_base, new_base) Parameters Used: number - It is used to specify the number who base needs to be changed. current_base - It is used to specify the current base system of the number. new_base - It is used to specify the desired base system in which the number needs to be converted. Return Value: The MySQL CONV() function returns a value in the desired base system specified by the user. Supported Versions of MySQL: MySQL 5.7 MySQL 5.6 MySQL 5.5 MySQL 5.1 MySQL 5.0 MySQL 4.1 MySQL 4.0 MySQL 3.23 Example-1: Implementing CONV() function to convert a number from numeric base system 10 to numeric base system 2. SELECT CONV(20, 10, 2); Output: 10100 Example-2: Implementing CONV() function to convert a number from numeric base system 2 to numeric base system 10. SELECT CONV(10100, 2, 10); Output: 20 Example-3: Implementing CONV() function to convert a negative number from numeric base system 8 to numeric base system 10. SELECT CONV(-6, 8, 10); Output: 18446744073709551610 Example-4: Implementing CONV() function to convert a number from numeric base system 16 to numeric base system 10. SELECT CONV('8D', 16, 10); Output: 141 Comment More infoAdvertise with us Next Article MySQL | CONV( ) Function S Shubrodeep Banerjee Follow Improve Article Tags : SQL mysql SQLmysql 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 CONCAT() function in MySQL CONCAT() function in MySQL is used to concatenating the given arguments. It may have one or more arguments. If all arguments are nonbinary strings, the result is a nonbinary string. If the arguments include any binary strings, the result is a binary string. If a numeric argument is given then it is 2 min read MySQL | COMPRESS( ) Function The MySQL COMPRESS() function is used for the compression of a string. The value returned by the COMPRESS() function is a binary string. The COMPRESS() function stores non-empty strings as a four-byte length of the uncompressed string, which is then followed by the compressed string. If the string e 1 min read PLSQL | CONCAT 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 CONCAT function allows you to concatenate two strings together. To CONCAT more than two values, we can nest 1 min read MySQL | BINARY Function The MySQL BINARY function is used for converting a value to a binary string. The BINARY function can also be implemented using CAST function as CAST(value AS BINARY). The BINARY function accepts one parameter which is the value to be converted and returns a binary string. Syntax: BINARY value Parame 1 min read Like