What are the differences between stored procedure and
functions in SQL Server 2000?
Answer Posted / pavan pareta
1) functions are used for computations where as procedures
can be used for performing business logic
2) functions MUST return a value, procedures need not be.
3) you can have DML(insert, update, delete) statements in a
function. But, you cannot call such a function in a SQL
query..eg: suppose, if u have a function that is updating a
table.. you can't call that function in any sql query.-
select myFunction(field) from sometable; will throw error.
4) function parameters are always IN, no OUT is possible
| Is This Answer Correct ? | 145 Yes | 43 No |
Post New Answer View All Answers
What is ssl in sql server?
What is table valued function and scalar valued functions?
What are different types of replication in sql server?
You want to implement the one-to-one relationship while designing tables. How would you do it?
What is sql or structured query language?
List out a number of the wants to setup a SQL Server failover cluster?
Determine when to use stored procedure to complete sql server tasks?
What is PROJECTION Operation?
Why are you getting errors when creating a new odbc dsn?
What is meant by referential integrity?
What is standby servers? Explain types of standby servers.
What do you understand by SQL*Net?
How to find a value in another dataset based on current dataset field (ssrs 2008 r2)?
How to join two tables in a single query in ms sql server?
List types of tables in SQL Azure?