views:

37

answers:

2

We can declare a cursor like this

DECLARE cur1 CURSOR FOR SELECT id,data FROM test.t1;

Can we use a join query instead of a simple query?

A: 

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

Ramesh Tabarna
A: 

The simple answer is yes. You can you a join query when declaring a cursor.

Gary