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 |
how we can store the value like that 001,003,023 etc in sql server 2005
What is the difference between a clustered index and a non-clustered index?
What is impersonation? What are the different impersonation options available in ssas? : sql server analysis services, ssas
How to connect php with different port numbers?
Do you know what is xpath?
How you can find out if an index is useful to the optimizer?
I have a table Events Events containing cardno,time,id,name--each id has a cardno my requirement is every day each employee swipe the card several times i want to calculate first and last time of each card the output should be name 1 2 6 7 in out in out holiday holiday xxx 09:30 06:30 09:40 06:45 where 1,2...... are dates for example january 1,2, etc. 6 and 7 are saturday and sunday how it is posssible
wat wil hapn if we give the both read and deny read permission to user?
How can you control the amount of free space in your index pages?
To automatically record the time on which the data was modified in a table, which data type should you choose for the column?
Can we return Data from 4(more than 1) tables in stored procedure?
What is filter index?