Languages
[Edit]
EN

MySQL - CONVERT() function example

0 points
Created by:
Dirask Community
6240

In this article, we would like to show you CONVERT() function example in MySQL.

Quick solution:

SELECT CONVERT(value, DATA_TYPE);

Note:

Go to the official documentation to see available DATA_TYPES.

Practical example

In this example, we will convert INT value to CHAR type using CONVERT() function.

Query:

SELECT CONVERT(100, CHAR) AS 'int_to_char';

Result:

MySQL - CONVERT() function example
MySQL - CONVERT() function example

Note:

Go to this article to see how to convert columns using CONVERT() function.

Related post

MySQL - functions

Native Advertising
­čÜÇ
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

ÔŁĄ´ŞĆ­čĺ╗ ­čÖé

Join