Send to a Friend

Ranimi23's avatar

When to use stored procedure and when function in SQL Server 2008?

Asked by Ranimi23 (1917points) February 16th, 2010

I use a lot of stored procedures, but every one of them has the same code select rows from table I have. I am returning the same table with every procedure, besides additional tables that are returned.

So, this table I am reading every time, should it be a Function or another stored procedure I should call?

Right now I have the same code lines repeated several times. If I am going to change the table I’m reading, I will need to change the code in all my stored procedure.

What is the right solution?
small SP that calling other SP, or using function?

Using Fluther

or

Using Email

Separate multiple emails with commas.
We’ll only use these emails for this message.