Updated: 17 July 2006

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

CAST, and, CONVERT, (Transact-SQL)

Syntax for CAST:
CAST ( expression AS data_type [ (length ) ])

Syntax for CONVERT:
CONVERT ( data_type [ ( length ) ] , expression [ , style ] )

相关文章: