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 the datatype of rowid?

510


How to how to convert numeric expression data types using the convert() function??

546


What are the advantages of using third-party tools?

556


What are indexes in sql?

580


How to generate create table script on an existing table in ms sql server?

643






What is temporal data type?

525


How to convert numeric expression data types using the cast() function?

546


Differentiate sql server reporting services vs. Crystal reports?

150


What does truncate do?

533


Explain what is analysis service repository?

536


Explain what is scheduled job and how to create it?

546


Can we shrink data file in sql server?

539


Can foreign key be deleted?

530


What is table level trigger?

586


What are the default system databases in sql server 2000?

541