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
How to manipulate data from one table to another table ?
What Are the Main Features of SQL Azure?
What does the on delete cascade option do?
Where can you find the error log information? : sql server database administration
What are pages and extents? : SQL Server Architecture
Are semicolons required at the end of sql statements in sql server 2005?
How to get nth highest salary from employee table.
How can we delete a table in sql server?
What is model database? : SQL Server Architecture
What does COMMIT command do?
How can I create a report based on a query? : sql server management studio
Explain what you mean by 3 tier architecture.
Difference between group by clause and having clause in SQL?
Why Master database is required?
last function used in MS Access to convert sql what function will use in sql