What is difference between stored procedure & function?
Answer Posted / khurram
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 allow select as well as DML statement in it
whereas function allow 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.
| Is This Answer Correct ? | 17 Yes | 3 No |
Post New Answer View All Answers
What is normalization process?
Can two tables have the same primary key?
What is the purpose of indexing?
What is the difference between cartesian product and cross join?
Do you know how to make remote connection in database?
Explain insert into select statement?
How to delete existing triggers using "drop trigger"?
What does it mean to normalize a database and why would you do it?
How to include date and time values in sql statements?
Explain time data type in sal server 2008?
How to get nth highest salary from employee table.
How many types of cursor type are there?
How do I know if localdb is running?
what is normalization? Explain different levels of normalization? : Sql server database administration
can you implement data mining in SSRS?