what is the difference between procedure and function.

Answer Posted / saraswathi muthuraman

Function :

1) Must return a single value. Only one value can be return
from a function.

2) Can be called from a sql(insert,update,delete) or
assignment st.U can't execute the function directly.

3) Can have DML,DDL,TLC inside function. But those function
can not be called from a sql.

Procedure :

1) Procedure can return multiple values.Procedure is
optional to return a value.

2) Can be executed directly and u can't called procedure
from sql.

3)Can have DML,DDL,TLC inside Procedure.

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the synonym of join?

515


What is the function of inner join?

546


Explain transaction server implicit?

513


What is not null constraint?

614


What is store procedure? How do they work?

570






How to write a query with a right outer join in ms sql server?

476


How to create a view using data from another view?

557


How do I create a partition table in sql server?

482


Explain Geography datatype in SQL Server

622


Tell me the difference between clustered and non-clustered index?

503


Write down the syntax and an example for create, rename and delete index?

524


What language is sql server written in?

523


Where in ms sql server is ’100’ equal to ‘0’?

592


What are the different editions available in sql server 2000?

582


How to create a Master database in SQL server ?

547