What is difference between stored procedure and function?
Answer Posted / 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 |
Post New Answer View All Answers
What is index, cluster index and nonclustered index?
What are character string data types in ms sql server?
Explain primary key and foreign key constraints?
How can you set the threshold at which sql server will generate keysets asynchronously?
Indexes are updated automatically is the full-text index also updated automatically?
What are the new features are introduced in sql server 2012 reporting services?
Does group by or order by come first?
Tell me what is log shipping?
What is intellisense?
What are the differences between web role and worker role?
What are the differences between substr and charindex in sql server.
How to count groups returned with the group by clause in ms sql server?
How to create a view with data from multiple tables?
Is mysql better than sql server?
What is SQL Azure Fabric?