EN
MS SQL Server - CONVERT() function example
0
points
In this article, we would like to show you CONVERT()
function example in MS SQL Server.
Quick solution:
SELECT CONVERT(DATA_TYPE, value);
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(CHAR, 100) AS 'int_to_char';
Result:
Note:
Go to this article to see how to convert columns using
CONVERT()
function.