What is a Stored Procedure?
A Stored Procedure is a group of logical SQL statements to perform a specific task, such as insert, select, update and delete operations on a table and so on which is stored in a SQL database.
What is a function ?
Function is the logical group of SQL statements which returns single value by performing the operation on group of SQL statements .it also stored in database.
For More Detail :- http://www.compilemode.com/2015/11/function-vs-stored-procedure-in-sql.html