SQL Server Cast

Posted by Derek Dieter on SQL Server Planet See other posts from SQL Server Planet or by Derek Dieter
Published on Sat, 05 Jun 2010 00:03:37 +0000 Indexed on 2010/06/05 6:04 UTC
Read the original article Hit count: 351

Filed under:
The SQL Server cast function is the easiest data type conversion function to be used compared to the CONVERT function. It takes only one parameter followed by the AS clause to convert a specified value. A quick example is the following:SELECT UserID_String = CAST(UserID AS varchar(50)) FROM dbo.UserThis example will convert the integer to a character value. [...]

© SQL Server Planet or respective owner

Related posts about sql