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 is partial class?

553


What is the difference between executenonquery () and executescalar ()?

500


How do you implement locking concept for dataset?

549


What is ado.net full form?

562


How to store data in memory?

514






What is a serialized object?

544


What is maximum pool size in ado.net connection string?

508


Explain the difference in record set and dataset?

501


Describe datareader object of ado.net with example.

522


What is the default timeout specified for "sqlcommand.commandtimeout" property?

551


differences between ADO and ADO.NET

581


What is microsoft ado?

522


What is the difference between Response.Expires and Reponse.ExpiresAbsolute?

549


What are the different namespaces used in the project to connect the database? What data providers available in .net to connect to database?

781


What is ado in agriculture?

521