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 triggers? : Sql server database administration
What do you do in data exploration
what are isolation levels? : Sql server database administration
What is coalesce and check constraint in sql server?
how to overcome kernel isssues
What are the triggers in sql?
What is a constant or literal in ms sql server?
What are the advantages of the mirroring?
Define tool Manage Statistics in SQL Server 2000 query ?
Is it possible to have clustered index on separate drive from original table location?
What is scan table/view and seek table/view when its occurs? : sql server database administration
What is the server name for sql management studio?
What happens if time-only values are provided as date and time literals?
I have all the primary data files, secondary data files as well as logs. Now, tell me can I still restore the database without having a full backup? : sql server database administration
What is the difference between index seek vs. Index scan?