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

Answers were Sorted based on User's Feedback



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

Answer / 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

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

Answer / samant

1.For user defined function one must have to specify it's
return type while in stored procedure it is not mandatory.

2. u can use function in expression but not stored
procedures

Is This Answer Correct ?    3 Yes 0 No

Post New Answer

More SQL Server Interview Questions

Suppose in a situation if two list boxes are there and if you select multiple options based on that the options related to those selected items should display in second list box. Again if we select multiple items in second listbox then the related to those selected items should display . In this scenario how will you design database,tables?

1 Answers   HP,


What do you understand by recursive stored procedure?

0 Answers  


How to get a list of columns using the "sp_help" stored procedure in ms sql server?

0 Answers  


How to return the top 5 rows from a select query in ms sql server?

0 Answers  


query processing

0 Answers  






Explain use of expression builder.

0 Answers  


What is the process of indexing?

0 Answers  


what information is maintained within the msdb database? : Sql server administration

0 Answers  


one table has four field id,name,design,salary. i have to find maximum salary .

6 Answers  


How to connect sql server management studio express to sql server 2005 express?

0 Answers  


What is the purpose of update statistics and scope_identity() function?

0 Answers  


What is a dbms wizard?

0 Answers  


Categories