Using Variables with Functions : Variable Scope « Transact SQL « SQL Server / T-SQL






Using Variables with Functions


1> --Using Variables with Functions
2>
3> DECLARE @MyNumber Int
4> SET @MyNumber = 144
5> SELECT SQRT(@MyNumber)
6> GO

------------------------
                      12

(1 rows affected)
1>
2>
           
       








Related examples in the same category

1.Local variable must be defined using the DECLARE statement