Function result with 'AS' : AS « Select Query « SQL Server / T-SQL






Function result with 'AS'

21>
22> CREATE TABLE ConvertTest
23> (
24>    ColID int IDENTITY,
25>    ColTS timestamp
26> )
27> GO
1> INSERT INTO ConvertTest DEFAULT VALUES
2> GO

(1 rows affected)
1> SELECT ColTS AS "Uncoverted", CAST(ColTS AS int) AS "Converted" FROM ConvertTest
2> GO
Uncoverted

-------------------------------------------------------------------------------------
0x000000000000138A



(1 rows affected)
1> drop table convertTest;
2> GO
1>

           
       








Related examples in the same category

1.Use AS to add column alias
2.Column AS Alias