Mega Code Archive

 
Categories / MSSQL Tutorial / Data Convert Functions
 

Data type conversion can be performed using the CAST() and CONVERT() functions

5>  SELECT CAST('123' AS Int) 6> GO -----------         123 (1 rows affected) 1> SELECT CAST('123.4' AS Decimal(9,2)) 2> GO -----------      123.40 (1 rows affected) 1>