Sunday 28 August 2011

SQL server Cast and Print


DECLARE @VariableName varchar(30)
SET @VariableName = 'Ring'
BEGIN
   SELECT CAST(@VariableName as NVARCHAR(1))
 PRINT @VariableName;
END
GO
--------------------
out put:
R

No comments:

Post a Comment