difference between function and procedure

Answer Posted / ramya

1.a function must returns a value where as procedure may not return value
2.a procedure can have parameters of both i/p and o/p but
fun has only i/p parameters
3.in procedure we can perform all the dml operations but in function only select operation should be performed
4.we call a procedure by using 'exec' or 'execute' command where as function is called by using 'select' command

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is stored procedures?

715


What is explicit cursors?

735


Explain indexes disadvantages?

752


What is the user of Primary key?

741


Explain how you can configure a running aggregate in SSRS?

131






How to override dml statements with triggers?

752


Explain for xml explicit mode?

737


How to enable/disable indexes?

776


How do you know if sql server is running on your local system?

726


How to count groups returned with the group by clause in ms sql server?

741


What do you mean by stored techniques? How would we use it?

773


How do I find sql server instance name?

698


What is the significance of null value and why should we avoid permitting null values?

733


How can you find out how many rows returned in a cursor?

759


What are the different subsets of sql?

1183