Please don't specify the differences between stored procedure and functions. Just want the reasons where functions have an advantage over stored procedures.
My understanding is that stored procedures works faster than functions and it can do all that a function can do so why do we need function in place?
I have read articles where it states that it can easily embedded in an select statement but that can be done in stored procedure as well (by writing the whole select statement in the stored procedure).