Differences between functions and stored procedures?
Answer Posted / paras
UDF
1. Must return a value – a single result set
2. Directly used in select, order by,where, from
3. UDF can’t use nondeterministic function Such as
getdate(), rand()
4. Can’t change server enviroment variables
5. Stops execution of T-SQL code when error occurs
6. Can’t use temp table in UDF
Stored Procedure
1. Can return value – multiple result set
2. Can’t use in select
3. Can use nondeterministic functions
4. Can change server enviroment variables
5. Stored procedure move to the next instruction if you used
proper error handling,
6. Can use temp table in SP
| Is This Answer Correct ? | 6 Yes | 2 No |
Post New Answer View All Answers
What is explicit mode in sql server?
What is a benefit of using an after insert trigger over using a before insert trigger?
What is hierarchy, what are its types and difference between them? : sql server analysis services, ssas
Write a program using SQL queries to find a unique entry in a table.
What is indexing and its types?
What is the maximum size of a row in sql server?
What is lookup override?
Define cross join in sql server joins?
How to create sub reports?
What are approximate numeric data types in ms sql server?
What are trace flags?
In what version of sql server were synonyms released?
In one interview...interviewer ask me question pleas tell me sql server architecture.. can any body tell me the sql server architecture with digram
What are various ways to enhance the ssrs report?
What is a fill factor?