Cast to decimal -Cast to Int -Cast to varchar -Cast to datetime-Cast to date-Cast to float - SQL Server

SELECT CAST(25.65 AS int);

SELECT CAST(25.65 AS varchar);

SELECT CAST('2017-08-25' AS datetime);

SELECT CAST(GETDATE() AS date);

SELECT CAST(9.5 AS decimal(6,4));

SELECT CAST('5.50' AS float)

Comments

Popular posts from this blog

How to use DbFunctions.TruncateTime

Microsoft Access Connectivity from C#

Tool 'dotnet-ef' failed to install. dotnet core