Result: 14 (kết quả cắt phần thập phân phía sau)
SELECT CAST(14.85 AS float);
Result: 14.85
SELECT CAST(15.6 AS varchar);
Result: '15.6'
SELECT CAST(15.6 AS varchar(4));
Result: '15.6'
SELECT CAST('15.6' AS float);
Result: 15.6
SELECT CAST('2019-05-02' AS datetime);
Result: '2019-05-02 00:00:00.000'
Last lesson: SQL YEAR function
Next lesson: CONVERT function in SQL Server