set @sql ='select id,content from table'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 标签 sql游标 游标 cursor table