SQL Server Express Edition: CAST and CONVERT (T-SQL)

Platform:SQL Server Express Edition
Task:CAST and CONVERT (T-SQL)
Discussion:
Explicitly converts an expression of one data type to another. CAST and CONVERT provide similar functionality. Syntax
Example:
CAST and CONVERT (T-SQL)

Explicitly converts an expression of one data type to another. CAST and CONVERT provide similar functionality.
Syntax

Using CAST:

CAST(expression AS data_type)

Using CONVERT:

CONVERT (data_type[(length)], expression [, style])
Back to Index