set @strCursor ='declare table_cursor cursor scroll dynamic for '+@sql
--scroll表示可以向前向后
--dynamic表示可以可读可写
exec (@strCursor)
open table_cursor
set @strCursor ='declare table_cursor cursor scroll dynamic for '+@sql
--scroll表示可以向前向后
--dynamic表示可以可读可写
exec (@strCursor)
open table_cursor
转载于:https://www.cnblogs.com/hubj/archive/2010/07/20/1781456.html
来源:https://blog.csdn.net/weixin_30725315/article/details/99042748