Global Blue interview question

What are the difference between stored procedure and function?