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

Does a sql server 2005 select statement require a from?

696


Is there any difference between primary key and unique with the not null condition?

610


What are the types of subquery?

632


what is the difference between Delete and Truncate command in SQL

708


How to create new tables with "select ... Into" statements in ms sql server?

581






What is the openxml statement in sql server?

620


Where are stored procedures in sql server?

646


What is sql server profiler?

662


What are the different subsets of sql?

1066


How do I find the size of a sql server database?

558


What is sql server database?

579


How you can change a cross join into an inner join?

622


What is a rollup clause?

624


Why is there a performance difference between two similar queries where one uses union and the other uses union all?

611


What is function of master database?

104