--declare cursor
DECLARE seconda_cursor SCROLL CURSOR FOR
SELECT * from a order by IDfetch first from seconda_cursor
....
-->--declare cursor
DECLARE seconda_cursor SCROLL CURSOR FOR
SELECT pgxh from a order by ID    --写明字段fetch next from seconda_cursor
into @var_tempgxh while ...

解决方案 »

  1.   

    --declare cursor
    DECLARE seconda_cursor SCROLL CURSOR FOR
    SELECT aaa,bbb,ccc from a order by ID    fetch next from seconda_cursor
    into @var_tempgxh ---那这里我到底是把哪个字段的值给了@var_tempgxh (如果我想把aaa字段的值传出)
    如果反过来我怎样把@var_tempgxh的值传给aaa字段
      

  2.   

    倒过来做不了的,除非你的游标是for update的for update游标我也不懂怎么用
      

  3.   

    顶 谁知道游标的update 用法