What is difference between stored procedure and user defined function?



What is difference between stored procedure and user defined function?..

Answer / Pankaj Kumar Yadav

A stored procedure is a pre-compiled collection of SQL statements that can accept input parameters, return result sets, and perform complex tasks. It does not return a value but can be called directly or through a client application. A User Defined Function (UDF) is a named series of Transact-SQL statements that returns a single scalar value. UDFs can be used in SELECT, WHERE, ORDER BY, GROUP BY, and other expressions.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL Server Interview Questions

How to create an inline table-valued function?

1 Answers  


What is save transaction and save point?

1 Answers  


What do you mean by the term 'normalization'?

1 Answers   Tech Mahindra,


Can we join two tables without primary key?

1 Answers  


Explain what is the use of custom fields in report?

1 Answers  


What is WITH CHECK OPTION

3 Answers   Karur Vysya Bank KVB,


How many types of Cursor in SQL SERVER?

1 Answers  


Explain acid?

1 Answers  


Explain primary key?

1 Answers  


what are batch in sql server?

2 Answers   Satyam,


Create Index myIndex On myTable(myColumn) What type of Index will get created after executing the above statement

3 Answers  


What are key constraints?

1 Answers  


Categories