Tuesday, May 9, 2023

Why do we need SQL functions when stored procedures can do all what SQL function does?


A function can be used inline in SQL statements while stored procedures cannot.

you cannot call a stored procedure in a SELECT statement. I guess this could be a reason for using functions.





No comments:

Post a Comment

How to use SQL pagination using LIMIT and OFFSET

  How to extract just a portion of a larger result set from a SQL SELECT. LIMIT n is an alternative syntax to the FETCH FIRST n ROWS ONLY. T...