When do we use UDFs instead of Stored Procedures?
Posted in SQL Interview Questions, TSQL Interview Questions by Chandrasekhar Raparthi On August 29, 2016. No comments
Since there are more advantages of Stored procedures over UDFs, most of us think that stored procedures are the best always. There should be some reasons why UDFs were introduced in DBMS.
Below are the scenarios in which we should use UDFs only.
- Can Join the UDF output with another table. But we can’t write SELECT statements with Stored Procedures.
- Can call UDF in WHERE/HAVING clauses.
Happy Reading
Leave a Reply