Question: what is the difference between procedure and cursor?
Answer: A function or procedure is a set of instructions to perform some task. A cursor is an array that can stores the result set of a query. Stored procedures are pre-compiled objects and executes as bulk of statements, whereas cursors are used to execute row by row.