We can declare a cursor like this
DECLARE cur1 CURSOR FOR SELECT id,data FROM test.t1;
Can w开发者_如何学运维e use a join query instead of a simple query?
Yes, you can use all the various clauses in the SELECT statement except the "INTO" clause.
http://dev.mysql.com/doc/refman/5.0/en/declare-cursor.html
The simple answer is yes. You can you a join query when declaring a cursor.
精彩评论