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 are defaults? : Sql server database administration
Explain collation?
explain what is a deadlock and what is a live lock? How will you go about resolving deadlocks? : Sql server database administration
How to insert data with null values?
Do you know nested transaction?
What is create command?
How to execute a sql statement using odbc_exec()?
What you can do to delete a table without the delete trigger firing?
What is it’s similarity with sql server?
Can group functions be used in the order by clause in ms sql server?
What is msdb database? : SQL Server Architecture
How to create new table with "create table" statements?
Define Joins?
What is transaction server isolation?
What is the full form of ddl?