What is the difference between a stored procedure and a user
defined function in sql server?

Answer Posted / kumar.t

1. Stored Procedure to return the output parameter.
but function only return single values no output
parameter.

2. Select Clause we cann't use stored procdure. but
fucntion we can use.

3. XMl Clause contain we can use stored procdure. but
function we cann't use.

4. Whenever to execute function at present any error in the
function automatically to exit from the function. but
stored procudure to ignore the error then go to next line.

By
Kumar.T

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain table valued parameters in sql server? Why tvp used?

561


How to define and use table alias names in ms sql server?

563


How many databases Microsoft SQL server provides?

610


You want to check the syntax of a complicated update sql statement without executing it. What command should you use?

488


How do we know if any query is retrieving a large amount of data or very little data?

554






What is resource governor?

549


How to create an inline table-valued function?

540


What is difference between delete and truncate commands?

531


What is the difference between nvl and nvl2?

553


what happens on checkpoint? : Sql server database administration

511


How to connect of datebase with sql express.?

625


How we can compare two database data?

521


How to create a large table with random data for index testing in ms sql server?

539


A trigger can reference objects outside the current database? State true or false.

554


When do you think a developer should use sql server-based cursors?

524