SQL CAST Function

The SQL Server CAST Function converts an expression from one data type to another. If it is unable to convert an expression into the desired data type, this function will return an Error. The syntax of the SQL CAST Function is CAST(Expression AS Data_Type [(Length)]) SELECT CAST(123 AS VARCHAR(50)) AS [result_name] FROM [Source] SQL CAST … Read more