title: Cursors vs Procedures in SQL
body: <p>So, I just learned about CURSORS but still don't exactly grasp them. What is the difference between a cursor and procedure or even a function? </p>
  
  <p>So far from the various examples (DECLARE CURSOR ... SELECT ... FROM ...) It seems at most its a variable to hold a query. Is the data real time, or a snapshot of when the cursor was declared?</p>
  
  <p>i.e.
  I have a table with one row and one col with a value of 2.
  I do DECLARE CURSOR ... SELECT * FROM table1
  I then insert a new row with a value of 3.</p>
  
  <p>When I run the cursor, would I Just get the one row from before the cursor was declared, or both rows?</p>
  
  <p>Thanks</p>