Sql server function |
| Sanjay Verma replied to Lokesh M at 04-Jul-08 05:17 |
See the simple syntax of a function for getting the height and width multiplies as integer.
Create function get_int (@height int ,@width int) returns int as Begin return (@height*@width) End
How to call a function inside Stored Procedure
Suppose you are having a variable i with datatype integer in the stored proc.
SET i = myschema.get_int(5,8);
where get_int() is some function returning a value compatible with the datatype of i.
You can use the functions anywhere you want, like in condition checks (IF, WHILE, etc).
Hope it helps. |
| Biography |
| Asp.Net Developer |
|