当前位置: 代码迷 >> Sql Server >> 求救`SQL游标有关问题
  详细解决方案

求救`SQL游标有关问题

热度:47   发布时间:2016-04-27 17:25:28.0
求救```SQL游标问题
declare   cro_fastread   cursor   scroll
        for     后面跟参数可以吗`??

本来是:
        declare   cro_fastread   cursor   scroll
        for         select   Pr_id   from   Product   where   tint_level=0   and   [email protected]_tableid   order   by   int_id   desc

[email protected],[email protected]= "id=1   and   name= 'aaa ' "

有人帮助下吗`> > ??

------解决方案--------------------
可以。
比如
exec( 'declare c1 cursor for select * from T where '[email protected])
open c1
fetch .....
  相关解决方案