Tiger Analytics Interview Question

What is a stored procedure, and how is it different from a function?