What is the difference between stored procedure vs function?
Answer / Diksa Kapoor
Both Stored Procedures and Functions are database objects in SQL Server, but they have some key differences:
1. Purpose: Stored Procedures are used to perform a series of tasks or operations within the database, while Functions are used to return a single value from an expression based on input parameters.
2. Execution: A stored procedure is executed with the EXECUTE command, whereas a function is called like any other SQL statement using its name and passing input parameters if required.
3. Output: Stored Procedures do not have an output, while functions return a value that can be used in queries or assignments within SQL.
4. Example: A stored procedure might perform a complex data manipulation task like updating multiple related records, whereas a function could calculate a user's total purchases for a given period.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is State Management in .Net and how many ways are there to maintain a state in .Net?
Describe how to implement globalization and localization in the use interface in .net.
What tags do you need to add within the asp:datagrid tags to bind columns manually
Where sessions are stored in asp.net?
Explain About WebService
What r the asp.net list controls and diff. Between them?
What is the use of sessionstate tag in the web.config file?
What are the event handlers that can be included in the Global.asax file?
Which adapter should you use, if you want to get the data from an access database?
What’s the use of “GLOBAL.ASAX” file?
How to set/get parent page values in child page in asp.net
how can you handle "control is not part of this page " error?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)