Back To Normal

Subscribe To Our E-Mail Newsletter

Monday, May 3, 2010

Stored Functions in SQL Server?


Couch ModePrint It

A function always return a value,and it is called inside the sql statements like normal functions.

Examples:

CREATE FUNCTION CALC_AVERAGE (n1 INT, n2 INT)
  RETURNS INT
   DETERMINISTIC
    BEGIN
     DECLARE avg INT;
     SET avg = (n1+n2*2+n4*4)/8;
     RETURN avg;
    END|

Click Here For Smileys :D
:D
:)
:[
;)
:D
:O
(6)
(A)
:'(
:|
:o)
8)
(K)
(M)

No comments:

560 Free Online Courses

Top 200 universities launched 500 free online courses.  Please find the list here .