answersLogoWhite

0


Best Answer

we cant use DML operations in functions where as it is possible in sp. Procedure can return zero or n values whereas function can return one value which is mandatory. error handling can be done in sp, but not possible in function. functions can be called from select statements, where clause and case but not possible in sp. Procedures can have input,output parameters for it whereas functions can have only input parameters Functions can be called from procedure whereas procedures cannot be called from function. We can go for transaction management in procedure whereas we can't go in function.

User Avatar

Wiki User

15y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the difference between function and stored procedure?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Difference between a local procedure and stored procedure?

local procedure wont store in database. Stored procedure store in database permanently and we can use it whenever we require. Other program also can use this stored procedure. And the transaction of stored procedure take care by DBA. But the local procedure transaction is take care by manually only


What is the difference between a stored database procedure and a batch of SQL statements submitted by a client application?

Stored procedures prevent unauthorized access to data


Is it possible to call a stored procedure from java script function and populate an aspnet dropdown list HTML control using the value returned by the SP?

No, a stored procedure can not be called from Javascript. A dropdown list however can be populated using a stored procedure.


Where static variables stored?

they are stored in the memory.they obviously can't be stored in stack Bcoz there value won't be retained between function call.


What is the difference in English Language between a wardrobe and a cupboard?

Clothing is stored in a wardrobe. Dishes are stored in a cupboard.


Can You Write Trigger in Stored Procedures?

A trigger is a stored procedure. It is a special stored procedure that runs in response to some defined event, such as an insert into a table.


How to draw E-R diagram for library management system?

how to draw the er diagram of library management system


What is the difference between stored and action energies?

One is scientific and the other is ordinary


What is the meaning of the term stored procedure?

A stored procedure is considered a subroutine, which is considered to be only available to the applications with access to a relational database system.


What is the difference between stored procedure and index?

A stored procedure is a precompiled set of SQL statements that can be executed repeatedly, helping to streamline database operations and improve performance. On the other hand, an index is a database structure that increases the speed of data retrieval operations by quickly locating the rows in a table. Stored procedures are used to encapsulate logic for performing tasks, while indexes are used to optimize data retrieval.


In excel 2013 where are the various function categories stored on the Ribbon?

In Excel Where are the various function categories stored on the Ribbon?


What is the ecological difference between algae and fungi?

Algae are autotrophs, which means they bring new energy into the system. Fungi are heterotrophs. They function as parasites that regulate populations and as decomposers that release energy and nutrients stored in organic matter.