What is difference between stored procedure and function?
Answers were Sorted based on User's Feedback
Answer / rakesh
mojor difference is
function must return a value but a
procedure may or may not return a value
| Is This Answer Correct ? | 8 Yes | 1 No |
Answer / a.suresh
1.Stored Procedure return 0 to nth value where as function
return only one value which is must.
2.we can't use the stored procedure in select select
statement where as function can be used in the select statement.
3.we can use all the dml(insert,update,delete) commands in
stored procedure where as select statement only used in
functions.
4.we can use try catch in stored procedure where as in
functions cant.
function must be used with its schema where as stored
procedure used with out schema name
ex.dbo.function name
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / g.ashok
Stored Procedure need not to return a value.
Function should return a value.
| Is This Answer Correct ? | 1 Yes | 0 No |
Which sql server table is used to hold the stored procedure scripts?
How can you insert values in multiple rows using one Insert statement?
0 Answers Flextronics, Thomson Reuters, Virtusa,
How to delete a login name in ms sql server?
What is trigger explain with program?
What is the difference between count and distinct count?
What are Row versions of DataRow?
What are the tables in sql?
Explain primary key in sql server?
find the 3rd max salary
what is the signification difference of this bit data type between sql 6.5 and later version sql server?
What according to you is the difference between mysql and sql server performance?
What do you mean by 'normalization'?
0 Answers Ernst Young, Thomson Reuters,
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)