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 the steps to take to improve performance of a poor performing query? : sql server database administration
Where actually sql azure database is hosted?
How to configure and test odbc dsn settings?
1)what is the difference between Reinitializing a Subscription and synchronization the subscription? 2)when to use reinitializing ? 3)when to use synchronization? 4)when adding table or deleting a table what to do?(reinz.. or syn) 5)when adding a column what to do?
What are the security related catalog views? : sql server security
What is the difference between clustered index and primary key?
Are there any preferred steps that need to be taken care of before starting the installation of sql server 2000?
What is difference between views and tables?
Why and when do stored procedure recompile?
Can we write trigger for view?
What are different types of schemas?
What is lock escalation? : sql server database administration
What is the difference between seek predicate and predicate?
How can you transfer data from a text file to a database table? Or how can you export data from a table to a comma delimited (csv) file? Or how can you import data from ms access to a table in a database? Or how can you export data from a table to an excel file?
How to truncate the log in sql server 2012? : sql server database administration