Files
doris/docs/en/sql-manual/sql-functions/math-functions/conv.md
jiafeng.zhang 267e8b67c2 [refactor][doc]The new version of the document is online (#9272)
replace the `docs/` with `new-docs/`
2022-04-28 15:22:34 +08:00

1.5 KiB

title, language
title language
conv en

conv

description

Syntax

VARCHAR CONV(VARCHAR input, TINYINT from_base, TINYINT to_base) VARCHAR CONV(BIGINT input, TINYINT from_base, TINYINT to_base) Convert the input number to the target base. The input base range should be within [2,36].

example

MySQL [test]> SELECT CONV(15,10,2);
+-----------------+
| conv(15, 10, 2) |
+-----------------+
| 1111            |
+-----------------+

MySQL [test]> SELECT CONV('ff',16,10);
+--------------------+
| conv('ff', 16, 10) |
+--------------------+
| 255                |
+--------------------+

MySQL [test]> SELECT CONV(230,10,16);
+-------------------+
| conv(230, 10, 16) |
+-------------------+
| E6                |
+-------------------+

keyword

CONV