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 data source document?
How to insert data with null values?
Scalability, Availability, Integration with internet, etc.)?
What is the boxing and unboxing concept in .net?
What is change data capture (cdc) in sql server 2008?
What is the difference between varchar and nvarchar datatypes?
How to see the event list of an existing trigger using sys.trigger_events?
Can primary key be a foreign key?
Can we perform backup restore operation on tempdb? : sql server database administration
Tell me what do we need queues in sql service broker?
What is the difference between MVC and Teir Architecher? Plz explain with Layyered Programming example...? Thanks
Other than truncate statement, which other command can by-pass the trigger on the tables?
How efficient you are in oracle and SQL server?
Write a sql query to sort on different column name according to the parameters passed in the function?
Please explain what is “asynchronous” communication in sql server service broker?