Difference between Stored Procedure and Function

By Krishnamoorthy Sethuraman

Stored Procedure :supports deffered name resoultion Example while writing a stored procedure that uses table named tabl1 and tabl2 etc..but actually not exists in database is allowed only in during creation but runtime throws error
Function wont support deffered name resolution. Stored procedure returns always integer value by default zero. where as function return type could be scalar or table or table values(SQL Server).Stored Procedure is pre compiled exuction plan where as functions are not.

10 Responses to “Difference between Stored Procedure and Function”

  1. Amit Patel Says:

    thanks

  2. Amit Patel Says:

    Good one..

  3. Dileep Thom Says:

    NIce One……..:)

  4. pratik jain Says:

    Nice man.. thnx..

  5. Bharathi Says:

    Storedprocedure is a subprogram which performs some action with in the data base,where as function is asubprogram which is used ti estimate a value

  6. Zahid Ghafoor Says:

    Thanks

  7. Zahid Ghafoor Says:

    Very Nice…….!

  8. Jawad Nawaz Says:

    Very Nice…….!

  9. Nawaz Says:

    Good………………………

  10. navdeep Says:

    very nice

Leave a Reply