In this article I try to explain the difference between Stored Procedure and Function. I hope after reading this article you will be able to understand BASIC as well as ADVANCE difference between Stored Procedure and Functions (UDF). Comments, criticism and suggestions are always welcome....
In Sql Server, both functions and stored procedures can be defined as the logically grouping of Sql statements formed to complete a task, but still there are many differences between Stored procedure and Functions. These differences can be summarized as follows:- 1) A stored procedure can return...
diff. between stored procedure and function1. Functions are compiled and executed at run time.Stored procedures are stored in parsed and compiled format in the database. 2. Functions are basically used to compute values. We passes some parameters to functions as input and then it perform...
Ø User Defined Function can be executed using the “SELECT” clause whereas Stored Procedure cannot be Executed. Ø User Defined Function does not return any output parameters while Stored Procedure will return output parameters. Ø User Defined Function cannot make permanent changes to server ...
Calculating Average between two datetime columns Calculating the RATE as the similar financial function in Excel - SQL Server 2014-2016 Call a webservice from TSQL (Stored Procedure) Call function from view Call function on Linked server Call getdate from linked server call the multiple .sql fil...
They are the same. Both of them executes stored procedure when called as EXECsp_help GO EXECUTEsp_help GO I have seen enough times developer getting confused between EXEC and EXEC(). EXEC command executes stored procedure where as EXEC() function takes dynamic string as input and executes the...
What is the distinction between an actual and a formal parameter? Answer: When a function is called, the values (expressions) given in the function call are referred...Read full Define actual parameters? Answer: The arguments given in a function call are referred to as actua...
I have seen enough times developer getting confused between EXEC and EXEC(). EXEC command executes stored procedure where as EXEC() function takes dynamic string as input and executes them. EXEC('EXEC sp_help')GO Another common mistakes I have seen isnot using EXEC before store...
calculate time elapsed between two dates Calculating yrs, months, days, hours, mins, seconds between two dates. SQL Call a Class file in Asp.net Web Application call a vbscript function Call action method from middleware class call anchor tag onclick in aspx.cs file call asmx with HttpWebReq...
How do I calculate the difference between the dates in power query without loosing query folding? I tried using Duration.Days function, but it comes with an error saying I need to import the table as this disables the query folding. Is there any alternate way without importing the table? th...