Ankur Jain
What is the difference between functions and procedures in sql server?
By Ankur Jain in Databases & DBA on Aug 18 2014
  • Jiseo Lee
    Oct, 2016 18

    ??? runman7942.com ?? ???? ???? ?? ????

    • 0
  • Srikanth Reddy
    Jul, 2015 11

    A function cannot contain procedure, but viceversa its possible.

    • 0
  • Rahul Prajapat
    Jun, 2015 10

    Procedure can return zero or n values whereas function can return one value which is mandatory , Exception can be handled by try-catch block in a procedure whereas try-catch block cannot be used in a function.We can go for transaction management in procedure whereas we can't go in function.

    • 0
  • Pankaj  Kumar Choudhary
    May, 2015 29

    Procedure can return zero or n values whereas function can return one value which is mandatory , Exception can be handled by try-catch block in a procedure whereas try-catch block cannot be used in a function.We can go for transaction management in procedure whereas we can't go in function.

    • 0
  • Kml Surani
    May, 2015 13

    http://www.dotnet-tricks.com/Tutorial/sqlserver/7EDL150912-Difference-between-Stored-Procedure-and-Function-in-SQL-Server.html

    • 0
  • Ankur Jain
    Aug, 2014 18

    1) Procedure can return zero or n values whereas function can return one value which is mandatory 2) Procedures can have input, output parameters for it whereas functions can have only input parameters.3) Procedure allows select as well as DML(INSERT/UPDATE/DELETE) statements in it whereas function allows only select statement in it.4) Functions can be called from procedure whereas procedures cannot be called from function.5) Exception can be handled by try-catch block in a procedure whereas try-catch block cannot be used in a function.6) We can go for transaction management in procedure whereas we can't go in function.7) Procedures cannot be utilized in a select statement whereas function can be embedded in a select statement.

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS