Syntax:
DECLARE cursor_name CURSOR FOR select_statement

This statement declares a cursor. Multiple cursors may be declared in a
stored program, but each cursor in a given block must have a unique
name.

The SELECT statement cannot have an INTO clause.

Local variables should not be declared with the same name as columns
referenced by the SELECT statement, for reasons described in
http://dev.mysql.com/doc/refman/5.5/en/local-variable-scope.html.

For information available through SHOW statements, it is possible in
many cases to obtain equivalent information by using a cursor with an
INFORMATION_SCHEMA table.

URL: http://dev.mysql.com/doc/refman/5.5/en/declare-cursor.html

