SQL CONVERT Function

Example

Convert an expression to int:

SELECT CONVERT(int, 25.65);

Definition and Usage

The CONVERT() function converts a value (of any type) into a specified datatype.

Tip: Also look at the CAST() function.

Syntax

CONVERT(data_type(length), expression, style)

Continue reading SQL CONVERT Function