开发者

Join query in MySQL cursor

开发者 https://www.devze.com 2023-01-01 17:26 出处:网络
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 i

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消