diffrence between function and procedure

Answer Posted / jayanth

Functions always returns a value where as sp performs bath execution
functions can be used along with select statement and where clause where as functions cannot be used with update insert delete statements in which sp cannot be used with select and DML events
functions cannot be used with try catch block where as sp can use try catch block
functions are of two types system functions and user defined functions where as sp's are four types mostly
sp with parameters
sp without parameters
sp with out parameters
sp with return values

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain what is the difference between union and union all?

550


What is the index requirement in SQL Azure?

72


Which tcp/ip port does the sql server run on? How can it be changed?

531


What is indexed view? How to create it?

599


How can I create a report based on a query? : sql server management studio

564






What is the difference between MVC and Teir Architecher? Plz explain with Layyered Programming example...? Thanks

1615


What is xml datatype?

662


In one interview...interviewer ask me question pleas tell me sql server architecture.. can any body tell me the sql server architecture with digram

1518


What is the difference between rank and dense_rank?

507


Explain few examples of stored procedure over triggers?

525


What is update_statistics command?

576


Explain about local stored procedure?

510


How can delete duplicate records in cte in sql server?

524


How to update muliple row in single query?

613


Explain an automatic checkpoint

566