Differnce between Stored procedure and user defined functions?

Answer Posted / ranjanimanuel

1.UDF can't use a nondeterministic functions such as Getdate
(),RAND() where as StoreProcedure cn use such a functions.
2.UDF must return a value or a single resultset . Store
Procedure can return a value or even multiple resultsets,
but doesn't have to
3. UDF can be used in anywhere sql statements like
where/having/Select sections where as store procedure
cannot be.
4.UDFs that return table can be treated as another rowset.
This can be used in JOINS with other table

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does ado stand for in ado.net?

460


What is data adapter in ado.net with example?

524


What is the difference between Data adaptor and Data set?

515


How can we add/remove row's in "datatable" object of "dataset"?

541


What are three methods for displaying data in a syncfusion datagrid

614






What is difference between sqldatareader and sqldataadapter?

490


Data reader read and forward only, how is it possible to get 2 tables of data at a time?

496


What is the usage of the dataset object in ado.net?

491


What is ado.net in vb net?

508


Explain About ado.net components/objects. Usage of data adapters and tell the steps to retrieve data.

560


How will you fill the gridview by using datatable object at runtime?

555


What is data reader in ado.net?

501


Which namespaces are used for data access?

628


Why edit is not possible in repeater?

524


Which is better ole db or odbc?

499