what is the difference between procedure and function.
Answer Posted / saraswathi muthuraman
Function :
1) Must return a single value. Only one value can be return
from a function.
2) Can be called from a sql(insert,update,delete) or
assignment st.U can't execute the function directly.
3) Can have DML,DDL,TLC inside function. But those function
can not be called from a sql.
Procedure :
1) Procedure can return multiple values.Procedure is
optional to return a value.
2) Can be executed directly and u can't called procedure
from sql.
3)Can have DML,DDL,TLC inside Procedure.
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
How to maintain a fill factor in existing indexes?
Tell me what are cursors and when they are useful?
Why I can not enter 0.001 second in date and time literals in ms sql server?
What is dbcc updateusage?
Does sql server 2000 full-text search support clustering?
What is a virtual table in sql?
How to create an identity column?
What is primary key and example?
Does group by or order by come first?
What are the Advantages of using CTE in sql server?
Why it is recommended to avoid referencing a floating point column in the where clause?
After removing a table from database, what other related objects have to be dropped explicitly?
What is the maximum number of instances in 32 bit and 64 bit sql server 2012?
Explain the truncate command? : SQL Server Architecture
Which sql server is best?